(pytester: Pytester)
| 701 | |
| 702 | |
| 703 | def test_spawn_uses_tmphome(pytester: Pytester) -> None: |
| 704 | tmphome = str(pytester.path) |
| 705 | assert os.environ.get(class="st">"HOME") == tmphome |
| 706 | |
| 707 | pytester._monkeypatch.setenv(class="st">"CUSTOMENV", class="st">"42") |
| 708 | |
| 709 | p1 = pytester.makepyfile( |
| 710 | fclass="st">""" |
| 711 | import os |
| 712 | |
| 713 | def test(): |
| 714 | assert os.environ[class="st">"HOME"] == {tmphome!r} |
| 715 | assert os.environ[class="st">"CUSTOMENV"] == class="st">"42" |
| 716 | class="st">""" |
| 717 | ) |
| 718 | child = pytester.spawn_pytest(str(p1)) |
| 719 | out = child.read() |
| 720 | assert child.wait() == 0, out.decode(class="st">"utf8") |
| 721 | |
| 722 | |
| 723 | def test_run_result_repr() -> None: |
nothing calls this directly
no test coverage detected