Skip to content

Commit 95cc52f

Browse files
committed
can't test exception type when runtime is down
1 parent 3433201 commit 95cc52f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/embed_tests/pyinitialize.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,10 @@ public static void TestRunExitFuncs()
158158
catch (PythonException e)
159159
{
160160
string msg = e.ToString();
161+
bool isImportError = e.Is(Exceptions.ImportError);
161162
Runtime.Runtime.Shutdown();
162163

163-
if (e.Is(Exceptions.ImportError))
164+
if (isImportError)
164165
{
165166
Assert.Ignore("no atexit module");
166167
}

0 commit comments

Comments
 (0)