in
eee7a3add99df2865e6d907f2 I added a few TypeError
tests, and some python interpreters produce a message like
"join() got an unexpected...", others seem to produce
"Query.join() got an unexpected..."
the pattern is strange, all Python 3.10's seem to return the
class name. For Python 3.8 and 3.9, my local intepreters
are doing the Python 3.10 behavior but github actions are doing
the older behavior. Python 3.7 both here and on github actions
are doing the older behavior.
In any case, adjust the regexps to match both.
Change-Id: I3ab13e2be51ab243f8f6bcecf26fd03070cec17f
sess = fixture_session()
assert_raises_message(
TypeError,
- r"Query.join\(\) got an unexpected keyword argument 'foob'",
+ r".*join\(\) got an unexpected keyword argument 'foob'",
sess.query(User).join,
"address",
foob="bar",
)
assert_raises_message(
TypeError,
- r"Query.outerjoin\(\) got an unexpected keyword argument 'foob'",
+ r".*outerjoin\(\) got an unexpected keyword argument 'foob'",
sess.query(User).outerjoin,
"address",
foob="bar",
with expect_raises_message(
TypeError,
- r"Query.join\(\) takes from 2 to 3 positional arguments but "
+ r".*join\(\) takes from 2 to 3 positional arguments but "
"4 were given",
):
sess.query(User).join(User.orders, Order.items, Item.keywords)