Skip to content

Commit ddcef92

Browse files
committed
if the module failed to import in the subprocess, everything fails and we shouldn't try
1 parent e225a9f commit ddcef92

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_tagged_unittests.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,13 @@ def fun():
172172
passing_tests = []
173173
failed_tests = []
174174

175-
try:
176-
imported_test_module = __import__(testmod)
177-
except:
178-
imported_test_module = None
179-
180175
def get_pass_name(funcname, classname):
181-
# try hard to get a most specific pattern
182-
if imported_test_module:
176+
try:
177+
imported_test_module = __import__(testmod)
178+
except:
179+
imported_test_module = None
180+
else:
181+
# try hard to get a most specific pattern
183182
classname = "".join(classname.rpartition(testmod)[1:])
184183
clazz = imported_test_module
185184
path_to_class = classname.split(".")[1:]

0 commit comments

Comments
 (0)