diff options
Diffstat (limited to 'Lib/test/test_compile.py')
| -rw-r--r-- | Lib/test/test_compile.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index 4617a126ab..acebdbdc46 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -6,7 +6,7 @@ import _ast import tempfile import types from test import support -from test.support import script_helper +from test.support import script_helper, FakePath class TestSpecifics(unittest.TestCase): @@ -663,13 +663,7 @@ if 1: def test_path_like_objects(self): # An implicit test for PyUnicode_FSDecoder(). - class PathLike: - def __init__(self, path): - self._path = path - def __fspath__(self): - return self._path - - compile("42", PathLike("test_compile_pathlike"), "single") + compile("42", FakePath("test_compile_pathlike"), "single") def test_stack_overflow(self): # bpo-31113: Stack overflow when compile a long sequence of |
