Skip to content

Clean up pytest markers #65

@jankrepl

Description

@jankrepl

[pytest]
testpaths = tests
addopts =
-m "not todo and not slow and not internet"
--cov
--cov-config=tox.ini
--no-cov-on-fail
--durations=20
--verbosity=1
--color=yes
markers =
internet: requires connection to the internet
slow: mark denoting a test that is too slow
todo: mark denoting a test that is not written yet

It seems like the todo and slow markers are not used in the code anymore. Do you think we should keep them? Additionally, there are some tests that requires internet and are not marked with the marker internet. See below an example (maybe there are more?).

# @pytest.mark.internet
class TestCommonQueries:
"""A set of tests focused on some basic queries in the CommonQueries class."""
@pytest.mark.parametrize("dataset_id", EXISTING_DATASET_IDS)
def test_get_reference_space(self, dataset_id):
"""Test that all testing datasets are from reference space 9."""
assert CommonQueries.get_reference_space(dataset_id) == 9

Anyway, I am not sure how useful the internet marker is, however, it can help us identify and filter tests that require it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions