File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import copy
2- from importlib import import_module
32
43import pytest
54from syrupy .extensions .single_file import SingleFileSnapshotExtension
65
76
87@pytest .fixture (autouse = True )
98def _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 )
2019def _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
Original file line number Diff line number Diff 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 (
You can’t perform that action at this time.
0 commit comments