Skip to content
Snippets Groups Projects
Commit c904cc62 authored by Jean-Baptiste Bayle's avatar Jean-Baptiste Bayle
Browse files

Add unit tests for various orbit file versions

parent 1e837834
No related branches found
No related tags found
1 merge request!105Resolve "Error when using orbit files v2.0"
tests/keplerian-orbits.h5 filter=lfs diff=lfs merge=lfs -text
tests/*.h5 filter=lfs diff=lfs merge=lfs -text
File added
File added
File added
File moved
......@@ -22,6 +22,33 @@ def test_run_no_upsampling():
instru = Instrument(size=100, physics_upsampling=1, aafilter=None)
instru.simulate()
def test_no_orbit_file():
"""Test that simulations fail with an invalid orbit file."""
with pytest.raises(FileNotFoundError):
Instrument(size=100, orbits='tests/nonexistent-orbits.h5')
with pytest.raises(FileNotFoundError):
Instrument(size=100, t0=0, orbits='tests/nonexistent-orbits.h5')
def test_keplerian_orbits_1_0_5():
"""Test that simulations can run with Keplerian orbit files v1.0.2."""
instru = Instrument(size=100, orbits='tests/keplerian-orbits-1-0-2.h5')
instru.simulate()
def test_esa_orbits_1_0_5():
"""Test that simulations can run with ESA orbit files v1.0.2."""
instru = Instrument(size=100, orbits='tests/esa-orbits-1-0-2.h5')
instru.simulate()
def test_keplerian_orbits_2_0_dev():
"""Test that simulations can run with Keplerian orbit files v2.0.dev."""
instru = Instrument(size=100, orbits='tests/keplerian-orbits-2-0-dev.h5')
instru.simulate()
def test_esa_trailing_orbits_2_0_dev():
"""Test that simulations can run with ESA trailing orbit files v2.0.dev."""
instru = Instrument(size=100, orbits='tests/esa-trailing-orbits-2-0-dev.h5')
instru.simulate()
def test_locking():
"""Test that simulations can run with various lock configurations."""
# Test six free-running lasers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment