X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=unittest_utils.py;fp=unittest_utils.py;h=2dc8cfe231e5aad03d877fac8116472e0c4b6c3d;hb=4faa994d32223c8d560d9dad0ca90a3f7eb10d6a;hp=5987da6ba38194bf639b7382347ed599ff5bc0e9;hpb=c79ecbf708a63a54a9c3e8d189b65d4794930082;p=python_utils.git diff --git a/unittest_utils.py b/unittest_utils.py index 5987da6..2dc8cfe 100644 --- a/unittest_utils.py +++ b/unittest_utils.py @@ -1,9 +1,10 @@ #!/usr/bin/env python3 """Helpers for unittests. Note that when you import this we -automatically wrap unittest.main() with a call to bootstrap.initialize -so that we getLogger config, commandline args, logging control, -etc... this works fine but it's a little hacky so caveat emptor. + automatically wrap unittest.main() with a call to + bootstrap.initialize so that we getLogger config, commandline args, + logging control, etc... this works fine but it's a little hacky so + caveat emptor. """ import contextlib @@ -170,7 +171,7 @@ class RecordStdout(object): def __exit__(self, *args) -> bool: self.recorder.__exit__(*args) self.destination.seek(0) - return True + return None class RecordStderr(object): @@ -192,7 +193,7 @@ class RecordStderr(object): def __exit__(self, *args) -> bool: self.recorder.__exit__(*args) self.destination.seek(0) - return True + return None class RecordMultipleStreams(object):