From 20beeb482a3315c61b4c71b7d872ec14104ba914 Mon Sep 17 00:00:00 2001 From: Till Hoffmann Date: Fri, 13 Dec 2024 16:28:10 -0500 Subject: [PATCH] Add profiling tests. --- tests/test_profile.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/test_profile.py diff --git a/tests/test_profile.py b/tests/test_profile.py new file mode 100644 index 0000000..cda41df --- /dev/null +++ b/tests/test_profile.py @@ -0,0 +1,15 @@ +from pathlib import Path +import pytest +import sys + +sys.path.append(str(Path(__file__).parent.parent / "profile")) +from run_profile import __main__ # noqa: E402 + + +@pytest.mark.parametrize("method", ["sample", "variational"]) +@pytest.mark.parametrize("parameterization", [ + "graph_centered", "graph_non_centered", "fourier_centered", "fourier_non_centered", + "standard_centered", "standard_non_centered" +]) +def test_run_profile(method, parameterization) -> None: + __main__([method, parameterization, "1", "--n=16", "--ignore_converged"])