File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 10
10
import pathlib
11
11
import py_compile
12
12
import re
13
+ import sys
13
14
14
15
import pytest
15
16
26
27
class RunFileTest (CoverageTest ):
27
28
"""Test cases for `run_python_file`."""
28
29
30
+ @pytest .fixture (autouse = True )
31
+ def clean_up (self ):
32
+ """These tests all run in-process. Clean up global changes."""
33
+ yield
34
+ sys .excepthook = sys .__excepthook__
35
+
29
36
def test_run_python_file (self ):
30
37
run_python_file ([TRY_EXECFILE , "arg1" , "arg2" ])
31
38
mod_globs = json .loads (self .stdout ())
Original file line number Diff line number Diff line change @@ -1092,6 +1092,8 @@ def test_bug_909(self):
1092
1092
class ExcepthookTest (CoverageTest ):
1093
1093
"""Tests of sys.excepthook support."""
1094
1094
1095
+ # TODO: do we need these as process tests if we have test_execfile.py:RunFileTest?
1096
+
1095
1097
def test_excepthook (self ):
1096
1098
self .make_file ("excepthook.py" , """\
1097
1099
import sys
You can’t perform that action at this time.
0 commit comments