fix test tooling bug

This commit is contained in:
protolambda
2019-05-11 17:51:02 +02:00
parent 3189cf0079
commit a39623a95a

View File

@@ -14,11 +14,14 @@ def spec_state_test(fn):
def expect_assertion_error(fn):
bad = False
try:
fn()
raise AssertionError('expected an assertion error, but got none.')
bad = True
except AssertionError:
pass
except IndexError:
# Index errors are special; the spec is not explicit on bound checking, an IndexError is like a failed assert.
pass
if bad:
raise AssertionError('expected an assertion error, but got none.')