Skip to content

Commit

Permalink
Parameterize over test data objects in link_test_orbit
Browse files Browse the repository at this point in the history
  • Loading branch information
moeyensj committed Oct 19, 2023
1 parent 05149a5 commit 225f895
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/conda-build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ jobs:
run: pre-commit run --all-files
- name: Test
run: pytest . --cov
- name: Integration Tests
run: pytest . -m "integtation"
2 changes: 2 additions & 0 deletions .github/workflows/pip-build-lint-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
run: pre-commit run --all-files
- name: Test
run: pytest . --cov --cov-report xml
- name: Integration Tests
run: pytest . -m "integration"
- name: Coverage
uses: coverallsapp/[email protected]
with:
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ test=pytest

[tool:pytest]
python_functions = test_*
addopts = -m "not integration"

[isort]
profile = black
Expand Down
22 changes: 19 additions & 3 deletions thor/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,25 @@ def test_range_and_transform(object_id, orbits, observations):
assert pc.all(pc.equal(obs_ids_actual, obs_ids_expected))


# Limit to a single orbit for now
@pytest.mark.parametrize("object_id", OBJECT_IDS[10:11])
@pytest.mark.integration_test
@pytest.mark.parametrize(
"object_id",
[
pytest.param(OBJECT_IDS[0], marks=pytest.mark.xfail(reason="Fails OD")),
]
+ OBJECT_IDS[1:3]
+ [
pytest.param(OBJECT_IDS[3], marks=pytest.mark.xfail(reason="Fails OD")),
pytest.param(OBJECT_IDS[4], marks=pytest.mark.xfail(reason="Fails OD")),
pytest.param(OBJECT_IDS[5], marks=pytest.mark.xfail(reason="Fails OD")),
]
+ [OBJECT_IDS[6]]
+ [
pytest.param(OBJECT_IDS[7], marks=pytest.mark.xfail(reason="Fails OD")),
pytest.param(OBJECT_IDS[8], marks=pytest.mark.xfail(reason="Fails OD")),
]
+ OBJECT_IDS[9:],
)
@pytest.mark.integration
def test_link_test_orbit(object_id, orbits, observations):

orbit = orbits.select("object_id", object_id)
Expand Down

0 comments on commit 225f895

Please sign in to comment.