summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2020-06-10 00:06:24 -0500
committerptmcg <ptmcg@austin.rr.com>2020-06-10 00:06:24 -0500
commit0a00334fb82f54e10b3aa1de072afb3609971b7c (patch)
tree797b7c239543e5335c7bd3728ca8f0b227902f3d /tests
parent464ac7100d40ff17b3f90e3e779de03d863a95b1 (diff)
downloadpyparsing-git-0a00334fb82f54e10b3aa1de072afb3609971b7c.tar.gz
warn_on_assignment_to_Forward not working on PyPy - disable test for now if running on PyPy
Diffstat (limited to 'tests')
-rw-r--r--tests/test_unit.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_unit.py b/tests/test_unit.py
index 097290a..cf27a5a 100644
--- a/tests/test_unit.py
+++ b/tests/test_unit.py
@@ -18,14 +18,16 @@ from examples.jsonParser import jsonObject
from pyparsing import ParseException
from pyparsing import ParserElement
from tests.json_parser_tests import test1, test2, test3, test4, test5
+import platform
ppc = pp.pyparsing_common
ppt = pp.pyparsing_test
# see which Python implementation we are running
-CPYTHON_ENV = sys.platform == "win32"
+CPYTHON_ENV = platform.python_implementation() == "CPython"
IRON_PYTHON_ENV = sys.platform == "cli"
JYTHON_ENV = sys.platform.startswith("java")
+PYPY_ENV = platform.python_implementation() == "PyPy"
# simple utility for flattening nested lists
@@ -6822,6 +6824,9 @@ class Test2_WithoutPackrat(ppt.TestParseResultsAsserts, TestCase):
- warn_on_parse_using_empty_Forward - flag to enable warnings whan a Forward
has no contents defined (default=False)
"""
+ if PYPY_ENV:
+ print("warn_on_assignment_to_Forward not supported on PyPy")
+ return
with ppt.reset_pyparsing_context():
pp.__diag__.enable("warn_on_assignment_to_Forward")