Show More
@@ -568,3 +568,15 b' def test_assumption_named_tuples_share_getitem():' | |||
|
568 | 568 | pass |
|
569 | 569 | |
|
570 | 570 | assert A.__getitem__ == B.__getitem__ |
|
571 | ||
|
572 | ||
|
573 | @dec.skip_without("numpy") | |
|
574 | def test_module_access(): | |
|
575 | import numpy | |
|
576 | ||
|
577 | context = limited(numpy=numpy) | |
|
578 | assert guarded_eval("numpy.linalg.norm", context) == numpy.linalg.norm | |
|
579 | ||
|
580 | context = minimal(numpy=numpy) | |
|
581 | with pytest.raises(GuardRejection): | |
|
582 | guarded_eval("np.linalg.norm", context) |
General Comments 0
You need to be logged in to leave comments.
Login now