Skip to content

Commit 19ed5d7

Browse files
Fix tests
1 parent 598e9e5 commit 19ed5d7

2 files changed

Lines changed: 2 additions & 21 deletions

File tree

python/tests/conftest.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import copy
2-
from importlib import import_module
32

43
import pytest
54
from syrupy.extensions.single_file import SingleFileSnapshotExtension
65

76

87
@pytest.fixture(autouse=True)
98
def _reset_conversions():
10-
conversion = import_module("egglog.conversion")
9+
from egglog import conversion # noqa: PLC0415
1110

1211
old_conversions = copy.copy(conversion.CONVERSIONS)
1312
old_conversion_decls = copy.copy(conversion._TO_PROCESS_DECLS)
@@ -18,7 +17,7 @@ def _reset_conversions():
1817

1918
@pytest.fixture(autouse=True)
2019
def _reset_current_egraph():
21-
array_api = import_module("egglog.exp.array_api")
20+
from egglog.exp import array_api # noqa: PLC0415
2221

2322
yield
2423
array_api._CURRENT_EGRAPH = None

python/tests/test_bindings.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -108,24 +108,6 @@ def test_parse_and_run_program_exception(self):
108108
):
109109
egraph.run_program(*egraph.parse_program(program))
110110

111-
def test_generic_fresh_egraph_repro(self):
112-
program = GENERIC_FRESH_EGRAPH_REPRO.read_text()
113-
first = extract_best_term(program)
114-
115-
assert "get (vec" in first
116-
117-
second = extract_best_term(program.replace(GENERIC_FRESH_EGRAPH_ROOT, f"(let $__expr_0 {first})"))
118-
119-
assert second == GENERIC_FRESH_EGRAPH_RESOLVED
120-
121-
def test_generic_fresh_egraph_repro_without_inner_unstable_app(self):
122-
program = GENERIC_FRESH_EGRAPH_REPRO.read_text().replace(
123-
'(vec-of (unstable-app (unstable-fn "c0" i) (int 0)))',
124-
"(vec-of (int i))",
125-
)
126-
127-
assert extract_best_term(program) == GENERIC_FRESH_EGRAPH_RESOLVED
128-
129111
def test_run_rules(self):
130112
egraph = EGraph()
131113
res = egraph.run_program(

0 commit comments

Comments
 (0)