pytest-dev / pytest-dev/pytest-forked
Allow marked tests to be skipped under Windows
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 83
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
Currently, if the test is marked with forked, this plugin tries to run it in a forked subprocess regardless of the current env. Also, adding a conditional skip marker does not help and manifests itself as https://github.com/pytest-dev/pytest/issues/7327.
The following snippet still runs on Windows:
@pytest.mark.skipif(IS_WINDOWS, ...)
@pytest.mark.forked
def test():
...
The workaround that I currently use is:
@pytest.mark.skipif(IS_WINDOWS, ...)
def test():
...
if not IS_WINDOWS:
test = pytest.mark.forked(test)
This could be addressed in a few ways:
- Actually respect skip markers.
- Skip any tests marked with forked when the env is not supported.
- Run these tests but w/o trying to sandbox them.
I think I like 1+2 most.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided Windows example using the skipif and forked markers, and review the linked pytest issue 7327 for the marker interaction. Done should mean the selected behavior for unsupported Windows forked tests is implemented and verified against the reported snippet.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100