diff --git a/tests/test_main.py b/tests/test_main.py index b0dbe9ed5..0e43aaf41 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -9,6 +9,6 @@ class TestMain(TestCase): def test_main_with_dev_null(self): with tempfile.TemporaryDirectory() as temp_dir: os.chdir(temp_dir) - with open(os.devnull, 'w') as dev_null: - with redirect_stdout(dev_null): + with open(os.devnull, 'r') as dev_null: + with redirect_stdin(dev_null): main()