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

Inconsistent MPI marker docs/enums #34

Open
Helveg opened this issue May 10, 2021 · 1 comment
Open

Inconsistent MPI marker docs/enums #34

Helveg opened this issue May 10, 2021 · 1 comment

Comments

@Helveg
Copy link

Helveg commented May 10, 2021

The MPIMarkerEnum class lists 4 markers: mpi, mpi_skip, mpi_xfail and mpi_break; the MPI_MARKERS constant right below lists only 3 of them (misses mpi) and the marker docs don't mention mpi_break.

class MPIMarkerEnum(str, Enum):
"""
Enum containing all the markers used by pytest-mpi
"""
mpi = "mpi"
mpi_skip = "mpi_skip"
mpi_xfail = "mpi_xfail"
mpi_break = "mpi_break"
MPI_MARKERS = {
MPIMarkerEnum.mpi_skip: pytest.mark.skip(
reason="test does not work under mpi"
),
MPIMarkerEnum.mpi_break: pytest.mark.skip(
reason="test does not work under mpi"
),
MPIMarkerEnum.mpi_xfail: pytest.mark.xfail(
reason="test fails under mpi"
),
}

@aragilar
Copy link
Owner

The missing documentation is accidental, that should be fixed.

The MPI_MARKERS constant is correct—it's mapping the intent of the marker when being run under MPI to the appropriate pytest mark (as the mpi marker need do nothing when run under MPI, rather the inverse is true).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants