diff options
-rw-r--r-- | tests/testutils/runcli.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/testutils/runcli.py b/tests/testutils/runcli.py index 741517701..f9418e4c6 100644 --- a/tests/testutils/runcli.py +++ b/tests/testutils/runcli.py @@ -299,7 +299,8 @@ class Cli(CliRunner): return result def invoke(self, cli, args=None, color=False, binary_capture=False, **extra): - r = super().invoke(cli, args, input=os.devnull, color=color) + with open(os.devnull) as devnull: + r = super().invoke(cli, args, input=devnull, color=color) return Result(exit_code=r.exit_code, exception=r.exception, |