Skip to content

Commit 5c0c461

Browse files
authored
test: remove temp files created in aiperf unit-tests (#1539)
* Use temporary path as default value in AIperf tests * Revert type fix that's needed locally but breaks on the server
1 parent 58f6e57 commit 5c0c461

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/benchmark/test_run_aiperf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434

3535

3636
@pytest.fixture
37-
def create_config_data():
37+
def create_config_data(tmp_path):
3838
"""Returns a function with sample basic config, and allows mutation of fields to cover
3939
more cases or add extra fields"""
4040

4141
def _create_config(
4242
batch_name="test_batch",
43-
output_base_dir="test_output",
43+
output_base_dir=str(tmp_path),
4444
model="test-model",
4545
tokenizer="test-tokenizer",
4646
url="http://localhost:8000",
@@ -125,7 +125,7 @@ def test_init_with_valid_config(self, create_config_file):
125125
assert runner.config_path == config_file
126126
assert isinstance(runner.config, AIPerfConfig)
127127
assert runner.config.batch_name == "test_batch"
128-
assert runner.config.output_base_dir == "test_output"
128+
assert runner.config.output_base_dir == str(config_file.parent)
129129
assert runner.config.base_config.model == "test-model"
130130
assert runner.config.base_config.tokenizer == "test-tokenizer"
131131
assert runner.config.base_config.url == "http://localhost:8000"

0 commit comments

Comments
 (0)