Optionally poison modules known to not work with pyfakefs

Open
#1,089 2 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
testing

Research direction

Start with the “Modules not working with pyfakefs” section in docs/troubleshooting.rst and reproduce the delayed failures involving multiprocessing and subprocess. Then trace how pyfakefs intercepts filesystem-related calls to determine where detection could occur. Done means documented problematic modules trigger a clear exception or warning during tests, with coverage for the selected behavior.

Written by the indexing model from the issue text.

Description

enhancement

Is your feature request related to a problem? Please describe.
https://github.com/pytest-dev/pyfakefs/blob/main/docs/troubleshooting.rst#modules-not-working-with-pyfakefs documents a number of modules, most obviously multiprocessing and subprocess, as not playing nice with pyfakefs.

Describe the solution you'd like
I'd like to have a way for tests that call into functions in these modules to raise an exception (or at least raise a warning).

Describe alternatives you've considered
Trying to track down failures based on when pyfakefs does fail (often long after the call into problematic code in those modules).

Dominant language
Python
Stars
756
Forks
111
Avg merge
3d 21h
Merged PRs (30d)
10

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pytest-dev/pyfakefs

All issues in pytest-dev/pyfakefs

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.