workspace / tests /test_experiments /test_evaluate.py
AntonioJun's picture
Replace tests with local workspace contents
e8055cf verified
Raw
History Blame Contribute Delete
1.35 kB
from experiments import config, evaluate
def test_configure_symbolic_evaluation_uses_experiment_paths():
codes, results = evaluate.configure_symbolic_evaluation(
"A Hypothesis", "metric", "tracking", "uniform", 64
)
assert (
codes
== config.CACHES_ROOT
/ "spatial codes"
/ "metric"
/ "tracking"
/ "uniform"
/ "A Hypothesis"
/ "64"
/ "explicit"
)
assert (
results
== config.RESULTS_ROOT
/ "symbolic"
/ "metric"
/ "tracking"
/ "uniform"
/ "A Hypothesis"
/ "64"
/ "explicit"
)
assert evaluate.symbolic_launch.symbolic_run.SPATIAL_CODES_DIR == str(codes)
assert evaluate.symbolic_launch.symbolic_run.SPATIAL_CODES_FORMAT == "explicit"
assert evaluate.symbolic_launch.symbolic_run.results_dir_for_selection() == str(
results
)
def test_configure_symbolic_evaluation_accepts_compact_format():
codes, results = evaluate.configure_symbolic_evaluation(
"A Hypothesis",
"metric",
"tracking",
"uniform",
64,
spatial_code_format="compact",
)
assert codes.name == "compact"
assert results.name == "compact"
assert evaluate.symbolic_launch.symbolic_run.SPATIAL_CODES_FORMAT == "compact"