| 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") | |