Hi, I thought it would be nice to modernize tests a bit:
use with pytest.raises() or with raises() in multiple places
parametrize a few tests
make raises() manager throw AssertionError if expected exception was not raised inside the context
fix 1 or 2 asserts in tests that were incorrectly working due to the above
remove python 2 or <3.2 compatibility code (note: this extends beyond tests)
I have some doubts regarding existing tests if they really test what they say they do, especially test_self_any and test_self_all. However it should be checked by someone with more experience (I haven't used Self-related validation yet myself)
Hi, I thought it would be nice to modernize tests a bit:
with pytest.raises()
orwith raises()
in multiple placesraises()
manager throw AssertionError if expected exception was not raised inside the contextI have some doubts regarding existing tests if they really test what they say they do, especially
test_self_any
andtest_self_all
. However it should be checked by someone with more experience (I haven't usedSelf
-related validation yet myself)