Skip to content

Commit

Permalink
tests: basic test for evals
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Aug 13, 2024
1 parent fd34c30 commit 770ed2c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)

0 comments on commit 770ed2c

Please sign in to comment.