summaryrefslogtreecommitdiff
path: root/tests/test_strings.py
diff options
context:
space:
mode:
authorSaif Hakim <saif@benchling.com>2021-02-17 00:08:18 -0800
committerSybren A. Stüvel <sybren@stuvel.eu>2021-02-24 13:35:18 +0100
commit214c0f90e2dab0bc3d5a052cdf726c762cb4b74c (patch)
tree7d15b1fdc72bd4e21d19e73c4d433860507ad3ec /tests/test_strings.py
parent4c3cd57ae2717856e09b9fed587e4d1afa3b44f2 (diff)
downloadrsa-git-214c0f90e2dab0bc3d5a052cdf726c762cb4b74c.tar.gz
Clean up stdout when using unittest test runner
While pytest is the preferred test runner via tox, it looks like some folks are still running tests via `python3 setup.py test` which uses unittest and does not have good support for capturing stdout. To make using unittest slightly more friendly, we further swallow stdout / stderr for cli tests, and ensure print statements start on a newline.
Diffstat (limited to 'tests/test_strings.py')
-rw-r--r--tests/test_strings.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_strings.py b/tests/test_strings.py
index 1090a8e..e392627 100644
--- a/tests/test_strings.py
+++ b/tests/test_strings.py
@@ -29,7 +29,7 @@ class StringTest(unittest.TestCase):
def test_enc_dec(self):
message = unicode_string.encode('utf-8')
- print("\tMessage: %r" % message)
+ print("\n\tMessage: %r" % message)
encrypted = rsa.encrypt(message, self.pub)
print("\tEncrypted: %r" % encrypted)