There was an error while loading. Please reload this page.
1 parent c935b33 commit a5d6abaCopy full SHA for a5d6aba
1 file changed
Lib/test/test_codeop.py
@@ -3,12 +3,12 @@
3
Nick Mathewson
4
"""
5
import unittest
6
-from test.support import is_jython
+from test import support
7
8
from codeop import compile_command, PyCF_DONT_IMPLY_DEDENT
9
import io
10
11
-if is_jython:
+if support.is_jython:
12
import sys
13
14
def unify_callables(d):
@@ -21,7 +21,7 @@ class CodeopTests(unittest.TestCase):
21
22
def assertValid(self, str, symbol='single'):
23
'''succeed iff str is a valid piece of code'''
24
- if is_jython:
+ if support.is_jython:
25
code = compile_command(str, "<input>", symbol)
26
self.assertTrue(code)
27
if symbol == "single":
@@ -60,7 +60,7 @@ def test_valid(self):
60
av = self.assertValid
61
62
# special case
63
- if not is_jython:
+ if not support.is_jython:
64
self.assertEqual(compile_command(""),
65
compile("pass", "<input>", 'single',
66
PyCF_DONT_IMPLY_DEDENT))
0 commit comments