diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2020-06-05 02:42:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-05 02:42:44 (GMT) |
commit | a5d6aba318ead9cc756ba750a70da41f5def3f8f (patch) | |
tree | 5ffefd453f4af7330be0ba253bacf07709d753c2 /Lib/test | |
parent | c935b33322843b3abfd930cd24b8806f3923f1cc (diff) | |
download | cpython-a5d6aba318ead9cc756ba750a70da41f5def3f8f.zip cpython-a5d6aba318ead9cc756ba750a70da41f5def3f8f.tar.gz cpython-a5d6aba318ead9cc756ba750a70da41f5def3f8f.tar.bz2 |
[3.8] bpo-40807: Backport test_codeop change [GH-19670]
A tiny sliver of a 3.9 PEG parser patch needed to backport the test added by #20486.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_codeop.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_codeop.py b/Lib/test/test_codeop.py index 98da26f..4d52d15 100644 --- a/Lib/test/test_codeop.py +++ b/Lib/test/test_codeop.py @@ -3,12 +3,12 @@ Nick Mathewson """ import unittest -from test.support import is_jython +from test import support from codeop import compile_command, PyCF_DONT_IMPLY_DEDENT import io -if is_jython: +if support.is_jython: import sys def unify_callables(d): @@ -21,7 +21,7 @@ class CodeopTests(unittest.TestCase): def assertValid(self, str, symbol='single'): '''succeed iff str is a valid piece of code''' - if is_jython: + if support.is_jython: code = compile_command(str, "<input>", symbol) self.assertTrue(code) if symbol == "single": @@ -60,7 +60,7 @@ class CodeopTests(unittest.TestCase): av = self.assertValid # special case - if not is_jython: + if not support.is_jython: self.assertEqual(compile_command(""), compile("pass", "<input>", 'single', PyCF_DONT_IMPLY_DEDENT)) |