diff options
| author | Paul Sokolovsky | 2017-06-10 20:14:16 +0300 |
|---|---|---|
| committer | Paul Sokolovsky | 2017-06-10 20:34:38 +0300 |
| commit | 85d809d1f4e35a511e0a56b3411126e05a31c01b (patch) | |
| tree | 8debfecd0a6b83b6ba3d7e087058eec39a7b3c79 /tests/io | |
| parent | a2803b74f48849cb3a11fb492fee891044ecc1f4 (diff) | |
tests: Convert remaining "sys.exit()" to "raise SystemExit".
Diffstat (limited to 'tests/io')
| -rw-r--r-- | tests/io/buffered_writer.py | 3 | ||||
| -rw-r--r-- | tests/io/open_append.py | 3 | ||||
| -rw-r--r-- | tests/io/open_plus.py | 3 | ||||
| -rw-r--r-- | tests/io/resource_stream.py | 2 | ||||
| -rw-r--r-- | tests/io/write_ext.py | 3 |
5 files changed, 5 insertions, 9 deletions
diff --git a/tests/io/buffered_writer.py b/tests/io/buffered_writer.py index bb7b4e8db..c2cedb991 100644 --- a/tests/io/buffered_writer.py +++ b/tests/io/buffered_writer.py @@ -4,9 +4,8 @@ try: io.BytesIO io.BufferedWriter except AttributeError: - import sys print('SKIP') - sys.exit() + raise SystemExit bts = io.BytesIO() buf = io.BufferedWriter(bts, 8) diff --git a/tests/io/open_append.py b/tests/io/open_append.py index 2120b72f0..a696823bc 100644 --- a/tests/io/open_append.py +++ b/tests/io/open_append.py @@ -1,4 +1,3 @@ -import sys try: import uos as os except ImportError: @@ -6,7 +5,7 @@ except ImportError: if not hasattr(os, "unlink"): print("SKIP") - sys.exit() + raise SystemExit # cleanup in case testfile exists try: diff --git a/tests/io/open_plus.py b/tests/io/open_plus.py index 98598ee67..bba96fa2f 100644 --- a/tests/io/open_plus.py +++ b/tests/io/open_plus.py @@ -1,4 +1,3 @@ -import sys try: import uos as os except ImportError: @@ -6,7 +5,7 @@ except ImportError: if not hasattr(os, "unlink"): print("SKIP") - sys.exit() + raise SystemExit # cleanup in case testfile exists try: diff --git a/tests/io/resource_stream.py b/tests/io/resource_stream.py index 86975f118..37d985bf1 100644 --- a/tests/io/resource_stream.py +++ b/tests/io/resource_stream.py @@ -5,7 +5,7 @@ try: uio.resource_stream except AttributeError: print('SKIP') - sys.exit() + raise SystemExit buf = uio.resource_stream("data", "file2") print(buf.read()) diff --git a/tests/io/write_ext.py b/tests/io/write_ext.py index 19b616174..5a6eaa35c 100644 --- a/tests/io/write_ext.py +++ b/tests/io/write_ext.py @@ -5,9 +5,8 @@ import uio try: uio.BytesIO except AttributeError: - import sys print('SKIP') - sys.exit() + raise SystemExit buf = uio.BytesIO() |
