summaryrefslogtreecommitdiff
path: root/ply/test/testlex.py
diff options
context:
space:
mode:
Diffstat (limited to 'ply/test/testlex.py')
-rwxr-xr-xply/test/testlex.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/ply/test/testlex.py b/ply/test/testlex.py
index 3880f6f..83070a7 100755
--- a/ply/test/testlex.py
+++ b/ply/test/testlex.py
@@ -514,6 +514,26 @@ class LexBuildOptionTests(unittest.TestCase):
except OSError:
pass
+ def test_lex_optimize4(self):
+
+ # Regression test to make sure that reflags works correctly
+ # on Python 3.
+
+ for extension in ['py', 'pyc']:
+ try:
+ os.remove("opt4tab.{0}".format(extension))
+ except OSError:
+ pass
+
+ run_import("lex_optimize4")
+ run_import("lex_optimize4")
+
+ for extension in ['py', 'pyc']:
+ try:
+ os.remove("opt4tab.{0}".format(extension))
+ except OSError:
+ pass
+
def test_lex_opt_alias(self):
try:
os.remove("aliastab.py")