]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-89392: Remove test_main() in test_netrc (GH-108860) (#108872)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 4 Sep 2023 19:13:02 +0000 (22:13 +0300)
committerGitHub <noreply@github.com>
Mon, 4 Sep 2023 19:13:02 +0000 (21:13 +0200)
[3.12] gh-89392: Remove test_main() in test_netrc (GH-108860).
(cherry picked from commit 76f3c043b6c5971d5a13fc6decf87a80ddf7ef95)

Co-authored-by: T. Wouters <thomas@python.org>
Lib/test/test_netrc.py

index b38cb327f68eccfbf5cfd57d9ecc30170debae7b..81e11a293cc4c8beb04b8ef53a8734a5a6c2f0bd 100644 (file)
@@ -1,5 +1,5 @@
 import netrc, os, unittest, sys, textwrap
-from test.support import os_helper, run_unittest
+from test.support import os_helper
 
 try:
     import pwd
@@ -308,8 +308,6 @@ class NetrcTestCase(unittest.TestCase):
             self.assertEqual(nrc.hosts['foo.domain.com'],
                              ('anonymous', '', 'pass'))
 
-def test_main():
-    return run_unittest(NetrcTestCase)
 
 if __name__ == "__main__":
-    test_main()
+    unittest.main()