Skip to content

Commit

Permalink
Make tests run no from various directories.
Browse files Browse the repository at this point in the history
  • Loading branch information
wpietri committed Dec 7, 2023
1 parent d62c852 commit 8325b73
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_helm_runner.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import pathlib

SIMPLE_BBQ_DATA = pathlib.Path(__file__).parent / 'data/full_runs/simple_bbq'
from unittest.mock import Mock

import pytest
Expand All @@ -16,7 +19,7 @@ def test_cli_helm_runner_command():
assert len(BbqHelmTest.CATEGORIES) == len(runspecs)


@pytest.mark.datafiles('data/full_runs/simple_bbq')
@pytest.mark.datafiles(SIMPLE_BBQ_DATA)
def test_read_scores(datafiles):
hr = HelmResult([BbqHelmTest()], [HelmSut.GPT2], datafiles, None)
scores = hr.load_scores()
Expand All @@ -26,7 +29,7 @@ def test_read_scores(datafiles):
assert 0.7 == sut_scores['BbqHelmTest']['Age']['bbq_accuracy']


@pytest.mark.datafiles('data/full_runs/simple_bbq')
@pytest.mark.datafiles(SIMPLE_BBQ_DATA)
def test_ridiculous_benchmark(datafiles):
hr = HelmResult([BbqHelmTest()], [HelmSut.GPT2], datafiles, None)
scores = hr.load_scores()
Expand Down

0 comments on commit 8325b73

Please sign in to comment.