Skip to content
Snippets Groups Projects
Commit 40c60e1d authored by ulif's avatar ulif
Browse files

Also restore sys.stdin in argv-handler.

parent c0ec942b
No related branches found
No related tags found
No related merge requests found
......@@ -21,12 +21,14 @@ class FakeRandom(object):
@pytest.fixture(scope="function")
def argv_handler(request):
"""This fixture restores sys.argv after tests.
"""This fixture restores sys.argv and sys.stdin after tests.
"""
_argv_stored = sys.argv
_stdin_stored = sys.stdin
def teardown():
sys.argv = _argv_stored
sys.stdin = _stdin_stored
request.addfinalizer(teardown)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment