Skip to content

Add v4 pytest markers and TODO in documentation#1867

Merged
VeckoTheGecko merged 3 commits intov4-devfrom
v/v4-prep
Feb 17, 2025
Merged

Add v4 pytest markers and TODO in documentation#1867
VeckoTheGecko merged 3 commits intov4-devfrom
v/v4-prep

Conversation

@VeckoTheGecko
Copy link
Contributor

@VeckoTheGecko VeckoTheGecko commented Feb 17, 2025

Re the markers, added:

  • v4alpha: failing tests that should work for v4alpha
  • v4future: failing tests that should work for a future release of v4
  • v4remove: failing tests that should probably be removed later
    • This marker is used to postpone the decision of actually removing the test, for example if the test is just slightly off the path of v4 development and might still be relevant once the v4 roadmap is clearer. This prevents the test getting buried in git history

Note that these should be used in conjunction with pytest.mark.xfail. I couldn't combine it into one call due to some pytest magic in their internals, so we need to apply the marks directly like so:

import pytest


@pytest.mark.v4alpha
@pytest.mark.xfail
def test_failing_feature():
    assert False

usage:

# run all tests (including v4* ones)
pytest

# run all tests excluding those with v4 flags
pytest -m 'not v4alpha and not v4future and not v4remove'

@erikvansebille is there anything we should add to the todo documentation page added in this PR?

cc @willirath @fluidnumerics-joe @danliba re. this workflow

@VeckoTheGecko VeckoTheGecko changed the base branch from main to v4-dev February 17, 2025 11:50
Co-authored-by: Erik van Sebille <e.vansebille@uu.nl>
@VeckoTheGecko VeckoTheGecko merged commit 866dae8 into v4-dev Feb 17, 2025
12 of 13 checks passed
@VeckoTheGecko VeckoTheGecko deleted the v/v4-prep branch February 17, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants