Skip to content

Commit

Permalink
Fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
evhub committed Nov 6, 2023
1 parent 352b942 commit 27b8c7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions coconut/_pyparsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from collections import defaultdict

from coconut.constants import (
PYPY,
PURE_PYTHON,
use_fast_pyparsing_reprs,
use_packrat_parser,
Expand Down Expand Up @@ -187,7 +186,8 @@ def enableIncremental(*args, **kwargs):
use_computation_graph_env_var,
default=(
not MODERN_PYPARSING # not yet supported
and not PYPY # experimentally determined
# commented out to minimize memory footprint when running tests:
# and not PYPY # experimentally determined
),
)

Expand Down
8 changes: 6 additions & 2 deletions coconut/tests/src/cocotest/agnostic/primary_2.coco
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,16 @@ def primary_test_2() -> bool:
assert list(py_xs) == [] if sys.version_info >= (3,) else [4, 6]
for xs in [
zip((x for x in range(5)), (x for x in range(10))),
py_zip((x for x in range(5)), (x for x in range(10))),
map((,), (x for x in range(5)), (x for x in range(10))),
py_map((,), (x for x in range(5)), (x for x in range(10))),
]: # type: ignore
assert list(xs) == list(zip(range(5), range(5)))
assert list(xs) == []
for xs in [
py_zip((x for x in range(5)), (x for x in range(10))),
py_map((,), (x for x in range(5)), (x for x in range(10))),
]: # type: ignore
assert list(xs) == list(zip(range(5), range(5)))
assert list(xs) == [] if sys.version_info >= (3,) else list(zip(range(5), range(5)))
xs = map((.+1), range(5))
py_xs = py_map((.+1), range(5))
assert list(xs) == list(range(1, 6)) == list(xs)
Expand Down

0 comments on commit 27b8c7a

Please sign in to comment.