From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 4 Sep 2023 10:20:24 +0000 (-0700) Subject: [3.11] gh-89392: Remove test_main() in test_netrc (GH-108860) (GH-108868) X-Git-Tag: v3.11.6~148 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=723ca8c387e2624a842047f662ce0d7733ced4d9;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-89392: Remove test_main() in test_netrc (GH-108860) (GH-108868) (cherry picked from commit 76f3c043b6c5971d5a13fc6decf87a80ddf7ef95) Co-authored-by: Serhiy Storchaka --- diff --git a/Lib/test/test_netrc.py b/Lib/test/test_netrc.py index b38cb327f68e..81e11a293cc4 100644 --- a/Lib/test/test_netrc.py +++ b/Lib/test/test_netrc.py @@ -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()