File size: 662 Bytes
e8055cf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import pytest
from experiments import loader
def test_lists_human_readable_hypotheses():
names = loader.list_hypotheses()
assert "Compute Gravity Before Building Object Instances" in names
assert all(not name.endswith(".py") for name in names)
def test_loads_filename_with_spaces():
module = loader.load_hypothesis("Compute Gravity Before Building Object Instances")
assert callable(module.build_spatial_code)
assert callable(module.dump_spatial_code)
def test_missing_hypothesis_has_clear_error():
with pytest.raises(FileNotFoundError, match="hypothesis does not exist"):
loader.load_hypothesis("This Does Not Exist")
|