diff --git a/pyproject.toml b/pyproject.toml index 2d193ee1..ed7f5445 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -204,8 +204,13 @@ exclude = ["__snapshots__", "_build", "^conftest.py$"] python-source = "python" [tool.pytest.ini_options] -addopts = ["--import-mode=importlib", "-Werror"] +addopts = ["--import-mode=importlib"] testpaths = ["python"] python_files = ["test_*.py", "test.py"] markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"] norecursedirs = ["__snapshots__"] +filterwarnings = [ + "error", + "ignore::numba.core.errors.NumbaPerformanceWarning", + "ignore::pytest_benchmark.logger.PytestBenchmarkWarning", +] diff --git a/python/tests/test_high_level.py b/python/tests/test_high_level.py index 90e32863..57ee0d6f 100644 --- a/python/tests/test_high_level.py +++ b/python/tests/test_high_level.py @@ -224,18 +224,22 @@ def __init__(self, x: i64Like) -> None: ... def test_modules() -> None: - m = Module() + with pytest.deprecated_call(): + m = Module() @m.class_ class Numeric(Expr): ONE: ClassVar[Numeric] - m2 = Module() + with pytest.deprecated_call(): + m2 = Module() - @m2.class_ - class OtherNumeric(Expr): - @m2.method(cost=10) - def __init__(self, v: i64Like) -> None: ... + with pytest.deprecated_call(): + + @m2.class_ + class OtherNumeric(Expr): + @m2.method(cost=10) + def __init__(self, v: i64Like) -> None: ... egraph = EGraph([m, m2]) diff --git a/python/tests/test_modules.py b/python/tests/test_modules.py index 93c067d1..85b5c38b 100644 --- a/python/tests/test_modules.py +++ b/python/tests/test_modules.py @@ -17,18 +17,21 @@ def test_tree_modules(): # assert _BUILTIN_DECLS # assert BUILTINS._mod_decls == ModuleDeclarations(_BUILTIN_DECLS, []) - A, B, C = Module(), Module(), Module() + with pytest.deprecated_call(): + A, B, C = Module(), Module(), Module() # assert list(A._mod_decls._included_decls) == [_BUILTIN_DECLS] - a = A.relation("a") - b = B.relation("b") - c = C.relation("c") + with pytest.deprecated_call(): + a = A.relation("a") + b = B.relation("b") + c = C.relation("c") A.register(a()) B.register(b()) C.register(c()) - D = Module([A, B]) - d = D.relation("d") + with pytest.deprecated_call(): + D = Module([A, B]) + d = D.relation("d") D.register(d()) assert D._flatted_deps == [A, B]