[Python-checkins] cpython: Clean up test_coroutines a bit.

zach.ware python-checkins at python.org
Wed May 13 08:03:26 CEST 2015


https://hg.python.org/cpython/rev/78f06ef0ae5a
changeset:   96005:78f06ef0ae5a
user:        Zachary Ware <zachary.ware at gmail.com>
date:        Wed May 13 01:03:06 2015 -0500
summary:
  Clean up test_coroutines a bit.

No more test_main(), s/assertEquals/assertEqual/, and remove unused import.

files:
  Lib/test/test_coroutines.py |  15 +++------------
  1 files changed, 3 insertions(+), 12 deletions(-)


diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py
--- a/Lib/test/test_coroutines.py
+++ b/Lib/test/test_coroutines.py
@@ -1,5 +1,4 @@
 import contextlib
-import gc
 import sys
 import types
 import unittest
@@ -185,8 +184,8 @@
             await bar()
 
         f = foo()
-        self.assertEquals(f.send(None), 1)
-        self.assertEquals(f.send(None), 2)
+        self.assertEqual(f.send(None), 1)
+        self.assertEqual(f.send(None), 2)
         with self.assertRaises(StopIteration):
             f.send(None)
 
@@ -968,13 +967,5 @@
             self.assertEqual(foo().send(None), 1)
 
 
-def test_main():
-    support.run_unittest(AsyncBadSyntaxTest,
-                         CoroutineTest,
-                         CoroAsyncIOCompatTest,
-                         SysSetCoroWrapperTest,
-                         CAPITest)
-
-
 if __name__=="__main__":
-    test_main()
+    unittest.main()

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list