summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_io.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-03-23 14:30:16 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-03-23 14:30:16 (GMT)
commitdaa42c778e101fa158f89e3a8c5418be5eef90c6 (patch)
treea706d8b77ac0024918f9d560ef7156ea173c118a /Lib/test/test_io.py
parent325dc887caa15534309f4b7c419fadcd0bb1be7d (diff)
downloadcpython-daa42c778e101fa158f89e3a8c5418be5eef90c6.zip
cpython-daa42c778e101fa158f89e3a8c5418be5eef90c6.tar.gz
cpython-daa42c778e101fa158f89e3a8c5418be5eef90c6.tar.bz2
#17479: test_io now works with unittest test discovery. Patch by Zachary Ware.
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r--Lib/test/test_io.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 64c66d88..95b4d80 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -3226,7 +3226,7 @@ class PySignalsTest(SignalsTest):
test_reentrant_write_text = None
-def test_main():
+def load_tests(*args):
tests = (CIOTest, PyIOTest,
CBufferedReaderTest, PyBufferedReaderTest,
CBufferedWriterTest, PyBufferedWriterTest,
@@ -3259,7 +3259,8 @@ def test_main():
for name, obj in py_io_ns.items():
setattr(test, name, obj)
- support.run_unittest(*tests)
+ suite = unittest.TestSuite([unittest.makeSuite(test) for test in tests])
+ return suite
if __name__ == "__main__":
- test_main()
+ unittest.main()