File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ def test_inline_detects_from_imports(self, pytester: Pytester):
7474 class Choice(Enum):
7575 YES = 0
7676 NO = 1
77-
77+
7878 def m(a):
7979 b = a
8080 itest().given(a, Choice.YES).check_eq(b, Choice.YES)
@@ -86,6 +86,21 @@ def m(a):
8686 res = pytester .runpytest ()
8787 assert res .ret == 0
8888
89+ def test_fail_on_importing_missing_module (self , pytester : Pytester ):
90+ checkfile = pytester .makepyfile (
91+ """
92+ from inline import itest
93+ from scipy import owijef as st
94+
95+ def m(n, p):
96+ b = st.binom(n, p)
97+ itest().given(n, 100).given(p, 0.5).check_eq(b.mean(), n * p)
98+ """
99+ )
100+ for x in (pytester .path , checkfile ):
101+ items , reprec = pytester .inline_genitems (x )
102+ assert len (items ) == 0
103+
89104 def test_inline_malformed_given (self , pytester : Pytester ):
90105 checkfile = pytester .makepyfile (
91106 """
You can’t perform that action at this time.
0 commit comments