Author terry.reedy
Recipients Lita.Cho, gpolo, jesstess, serhiy.storchaka, terry.reedy, zach.ware
Date 2014-08-22.01:54:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The current test/test_*.py example file in the docs intentionally does not contain test_main.
The next section explaining that test.regrtest runs unittest.TestLoader.loadTestsFromModule if test_main does not exist. I believed support.run_unittest.

I never used test_main in, Grep test/test_*.py for 'test_main' or its absence to count others. Or search all issues for 'unittest discovery' for conversions.  For instance: #18258 made this change to the five test_codecmaps*.py files.
-def test_main():
-    support.run_unittest(__name__)
 if __name__ == "__main__":
-    test_main()
+    support.use_resources = ['urlfetch']
+    unittest.main()

This all said, running all tests in a file with two different values of an attribute of the tested module is an exceptional case.  Zach, what do you think?
Date User Action Args
2014-08-22 01:54:10terry.reedysetrecipients: + terry.reedy, gpolo, jesstess, zach.ware, serhiy.storchaka, Lita.Cho
2014-08-22 01:54:10terry.reedysetmessageid: <>
2014-08-22 01:54:10terry.reedylinkissue21585 messages
2014-08-22 01:54:09terry.reedycreate