From 770ed2caabed72588b1bba73446faa324100943d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bj=C3=A4reholt?= Date: Wed, 14 Aug 2024 01:09:32 +0200 Subject: [PATCH] tests: basic test for evals --- tests/test_eval.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_eval.py b/tests/test_eval.py index ecc8e4c3..188d7eea 100644 --- a/tests/test_eval.py +++ b/tests/test_eval.py @@ -4,7 +4,6 @@ @pytest.mark.slow -@pytest.mark.eval def test_eval(test): """ This test will be run for each eval in the tests list. @@ -18,4 +17,8 @@ def test_eval(test): # Hook to generate tests from the tests list def pytest_generate_tests(metafunc): if "test" in metafunc.fixturenames: - metafunc.parametrize("test", tests, ids=[test["name"] for test in tests]) + allowlist = ["hello"] # for now, only run the hello test + test_set, test_names = zip( + *[(test, test["name"]) for test in tests if test["name"] in allowlist] + ) + metafunc.parametrize("test", test_set, ids=test_names)