Skip to content

Commit 728ca72

Browse files
committed
Increase test coverage for reports
1 parent c473125 commit 728ca72

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/ramble/ramble/test/reports.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,21 @@ def test_multiple_groupby(mutable_mock_workspace_path, tmpdir_factory, capsys):
505505
)
506506

507507

508+
def test_unneeded_vars_are_ignored(mutable_mock_workspace_path):
509+
for exp in single_exp_results["experiments"]:
510+
for var_group in ["RAMBLE_VARIABLES", "RAMBLE_RAW_VARIABLES"]:
511+
exp[var_group]["command"] = "test_command"
512+
exp[var_group]["experiment_run_dir"] = "/test/dir"
513+
exp[var_group]["test_file_path"] = "/test/file"
514+
515+
where_query = None
516+
results_df = ramble.reports.prepare_data(single_exp_results, where_query)
517+
518+
assert "command" not in results_df.columns
519+
assert "experiment_run_dir" not in results_df.columns
520+
assert "test_file_path" not in results_df.columns
521+
522+
508523
@pytest.mark.parametrize("format", ["json", "yaml"])
509524
def test_index_printing(mutable_mock_workspace_path, tmpdir_factory, format):
510525
exp_results = {

0 commit comments

Comments
 (0)