diff options
-rw-r--r-- | lib/Crypto/SelfTest/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Crypto/SelfTest/__init__.py b/lib/Crypto/SelfTest/__init__.py index e2da0f8..7110cd2 100644 --- a/lib/Crypto/SelfTest/__init__.py +++ b/lib/Crypto/SelfTest/__init__.py @@ -66,6 +66,8 @@ def run(module=None, verbosity=0, stream=None, tests=None, config=None, **kwargs raise ValueError("'module' and 'tests' arguments are mutually exclusive") if stream is None: kwargs['stream'] = StringIO() + else: + kwargs['stream'] = stream runner = unittest.TextTestRunner(verbosity=verbosity, **kwargs) result = runner.run(suite) if not result.wasSuccessful(): |