diff options
author | David Lord <davidism@gmail.com> | 2021-02-25 10:44:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-25 10:44:24 -0800 |
commit | c76fea1696c0ffe7edff8a36cadd4686cda8cbfb (patch) | |
tree | 55ea8a1f4aa7ebc313c3bea99348425dfbd6d193 | |
parent | 1b1578dbbc706538914221352edc84d532cdd3a4 (diff) | |
parent | 24c6b8ab15dd488f35add7ceff1e296c2f852897 (diff) | |
download | click-c76fea1696c0ffe7edff8a36cadd4686cda8cbfb.tar.gz |
Merge pull request #1794 from MLH-Fellowship/fix-clirunner-isolation
CliRunner.isolation() returns type compatible with CliRunner.invoke()
-rw-r--r-- | src/click/testing.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/click/testing.py b/src/click/testing.py index 8cd6a1d..557fbef 100644 --- a/src/click/testing.py +++ b/src/click/testing.py @@ -208,6 +208,7 @@ class CliRunner: bytes_output, encoding=self.charset, name="<stdout>", mode="w" ) + bytes_error = None if self.mix_stderr: sys.stderr = sys.stdout else: @@ -262,7 +263,7 @@ class CliRunner: pass else: os.environ[key] = value - yield (bytes_output, not self.mix_stderr and bytes_error) + yield (bytes_output, bytes_error) finally: for key, value in old_env.items(): if value is None: |