File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 2020import pytest
2121
2222
23+ @pytest .fixture
24+ def pytester (pytester : pytest .Pytester ) -> pytest .Pytester :
25+ # Pytester internally in their constructor overrides the HOME and USERPROFILE env variables. This confuses Chromium hence we unset them.
26+ # See https://github.com/pytest-dev/pytest/blob/83536b4b0074ca35d90933d3ad46cb6efe7f5145/src/_pytest/pytester.py#L704-L705
27+ os .environ .pop ("HOME" , None )
28+ os .environ .pop ("USERPROFILE" , None )
29+ return pytester
30+
31+
2332@pytest .fixture (autouse = True )
2433def _add_async_marker (testdir : pytest .Testdir ) -> None :
2534 testdir .makefile (
Original file line number Diff line number Diff line change 2121import pytest
2222
2323
24+ @pytest .fixture
25+ def pytester (pytester : pytest .Pytester ) -> pytest .Pytester :
26+ # Pytester internally in their constructor overrides the HOME and USERPROFILE env variables. This confuses Chromium hence we unset them.
27+ # See https://github.com/pytest-dev/pytest/blob/83536b4b0074ca35d90933d3ad46cb6efe7f5145/src/_pytest/pytester.py#L704-L705
28+ os .environ .pop ("HOME" , None )
29+ os .environ .pop ("USERPROFILE" , None )
30+ return pytester
31+
32+
2433@pytest .fixture (autouse = True )
2534def _add_ini (testdir : pytest .Testdir ) -> None :
2635 testdir .makefile (
You can’t perform that action at this time.
0 commit comments