Skip to content

Conversation

@drammock
Copy link
Member

should prevent pytest warnings like this one:

======================================== warnings summary ========================================
mne/conftest.py:836
  /opt/mne/python/mne/conftest.py:836: PytestRemovedIn9Warning: Marks applied to fixtures have no effect
  See docs: https://docs.pytest.org/en/stable/deprecations.html#applying-a-mark-to-a-fixture-function
    @pytest.fixture(scope="session")

../../mambaforge/envs/mnedev/lib/python3.11/site-packages/_pytest/mark/structures.py:357
  /opt/mambaforge/envs/mnedev/lib/python3.11/site-packages/_pytest/mark/structures.py:357: PytestRemovedIn9Warning: Marks applied to fixtures have no effect
  See docs: https://docs.pytest.org/en/stable/deprecations.html#applying-a-mark-to-a-fixture-function
    store_mark(func, self.mark)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

@drammock drammock added the MAINT label Feb 13, 2024
@drammock drammock requested a review from larsoner February 13, 2024 18:22

@pytest.mark.slowtest
@testing.requires_testing_data
def test_source_space_exclusive_complete(src_volume_labels):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT this is the only test function that uses src_volume_labels, and since it's already marked with requires_testing_data I only copied over the slowtest mark.

@larsoner
Copy link
Member

Thanks @drammock !

@larsoner larsoner merged commit 7f06cb0 into mne-tools:main Feb 13, 2024
@drammock drammock deleted the pytest-deprecations branch February 15, 2024 22:33
snwnde pushed a commit to snwnde/mne-python that referenced this pull request Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants