Skip to content

Latest commit

 

History

History

polluting_demo

A miniature pytest suite that reproduces a classic test-pollution flake:

  • test_pollute.py::test_sets_env_flag writes to os.environ.
  • test_target.py::test_assumes_clean_env asserts the same env var is not set.

The target passes when run alone but fails after the polluter has run. Use this suite as a fixture to exercise flake-bisect:

python -m flake_bisect \
    --workdir examples/polluting_demo \
    --target test_target.py::test_assumes_clean_env

Expected: flake-bisect narrows down to test_pollute.py::test_sets_env_flag.