Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for testing only certain tags #17

Closed
reece opened this issue Sep 9, 2023 · 7 comments
Closed

Add support for testing only certain tags #17

reece opened this issue Sep 9, 2023 · 7 comments
Assignees
Labels
closed-by-stale stale Issue is stale and subject to automatic closing

Comments

@reece
Copy link
Member

reece commented Sep 9, 2023

See https://github.com/reece/pytest-optional-tests for background

@ecalifornica
Copy link
Member

Goals:

  • Marker for network tests.
    • HTTP: Does @pytest.mark.vcr satisfy this?
    • PSQL: Does mocking the client responses or running a local containerized Postgres obviate the need to mark database query tests?
  • Marker for smoke tests. Test suite should take no more than fifteen seconds, to be run frequently during local development. Does @pytest.mark.quick satisfy this?
  • Documentation:
    • A short description of each marker in the pytest configuration, to be displayed by pytest --markers. I could use help deciphering the current hgvs markers.
    • A section in the developer documentation regarding the test marker rubric, and how to use them.
  • Makefile updates?

Regarding our question today about mark exclusivity, it seems that the default is to run all tests, regardless of markers ($ pytest).
To run only tests marked quick: $ pytest -m quick
To run all tests, except tests marked quick: $ pytest -m "not quick"
From: https://docs.pytest.org/en/7.1.x/example/markers.html

Current hgvs markers:

@pytest.mark.extra:

@pytest.mark.issues:

@pytest.mark.mapping:

@pytest.mark.models:

@pytest.mark.normalization:

@pytest.mark.quick:

@pytest.mark.regression:

@pytest.mark.validation:

@pytest.mark.no_cover: disable coverage for this test.

@pytest.mark.anyio: mark the (coroutine function) test to be run asynchronously via anyio.

@pytest.mark.vcr: Mark the test as using VCR.py.

@pytest.mark.block_network: Block network access except for VCR recording.

@pytest.mark.default_cassette: Override the default cassette name.

@pytest.mark.allowed_hosts: List of regexes to match hosts to where connection must be allowed.

@reece
Copy link
Member Author

reece commented Sep 27, 2023

(Thinking... not forgotten)

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale Issue is stale and subject to automatic closing label Oct 28, 2023
Copy link

github-actions bot commented Nov 4, 2023

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2023
@reece reece reopened this Feb 19, 2024
@reece reece removed the stale Issue is stale and subject to automatic closing label Feb 19, 2024
@reece
Copy link
Member Author

reece commented Feb 19, 2024

This issue was closed by stalebot. It has been reopened to give more time for community review. See biocommons coding guidelines for stale issue and pull request policies. This resurrection is expected to be a onos.environ["GITHUB_TOKEN"]e-time event.

Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale Issue is stale and subject to automatic closing label May 20, 2024
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-by-stale stale Issue is stale and subject to automatic closing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants