We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30cba2c commit e4a8d1cCopy full SHA for e4a8d1c
nibabel/tests/test_tripwire.py
@@ -16,9 +16,6 @@ def test_tripwire():
16
with pytest.raises(TripWireError):
17
silly_module_name.do_silly_thing
18
# Check AttributeError can be checked too
19
- try:
+ with pytest.raises(AttributeError) as err:
20
silly_module_name.__wrapped__
21
- except TripWireError as err:
22
- assert isinstance(err, AttributeError)
23
- else:
24
- raise RuntimeError('No error raised, but expected')
+ assert isinstance(err.value, AttributeError)
0 commit comments