Skip to content

Commit a5d6aba

Browse files
authored
[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.
1 parent c935b33 commit a5d6aba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_codeop.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
Nick Mathewson
44
"""
55
import unittest
6-
from test.support import is_jython
6+
from test import support
77

88
from codeop import compile_command, PyCF_DONT_IMPLY_DEDENT
99
import io
1010

11-
if is_jython:
11+
if support.is_jython:
1212
import sys
1313

1414
def unify_callables(d):
@@ -21,7 +21,7 @@ class CodeopTests(unittest.TestCase):
2121

2222
def assertValid(self, str, symbol='single'):
2323
'''succeed iff str is a valid piece of code'''
24-
if is_jython:
24+
if support.is_jython:
2525
code = compile_command(str, "<input>", symbol)
2626
self.assertTrue(code)
2727
if symbol == "single":
@@ -60,7 +60,7 @@ def test_valid(self):
6060
av = self.assertValid
6161

6262
# special case
63-
if not is_jython:
63+
if not support.is_jython:
6464
self.assertEqual(compile_command(""),
6565
compile("pass", "<input>", 'single',
6666
PyCF_DONT_IMPLY_DEDENT))

0 commit comments

Comments
 (0)