File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -320,8 +320,10 @@ def test_error_loading_one_element(monkeypatch, tmpdir):
320
320
import errorloading1
321
321
assert isinstance (errorloading1 , apipkg .ApiModule )
322
322
assert errorloading1 .y == 0
323
- pytest .raises (ImportError , 'errorloading1.x' )
324
- pytest .raises (ImportError , 'errorloading1.x' )
323
+ with pytest .raises (ImportError ):
324
+ errorloading1 .x
325
+ with pytest .raises (ImportError ):
326
+ errorloading1 .x
325
327
326
328
327
329
def test_onfirstaccess (tmpdir , monkeypatch ):
@@ -493,7 +495,9 @@ def doit():
493
495
assert doit is orig .doit
494
496
495
497
del proxy .doit
496
- pytest .raises (AttributeError , "orig.doit" )
498
+
499
+ with pytest .raises (AttributeError ):
500
+ orig .doit
497
501
498
502
proxy .doit = doit
499
503
assert orig .doit is doit
You can’t perform that action at this time.
0 commit comments