Author terry.reedy
Recipients Lita.Cho, gpolo, jesstess, serhiy.storchaka, terry.reedy, zach.ware
Date 2014-08-18.00:00:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
My impression is that we are trying to move away from using test_main, or is using support.run_unittest considered a sufficient change from the old explicit suite method?

Anyway, here is an alternate approach, adding two lines to wrap all test classes, that tags the test classes in the code and hence in error messages.

import unittest
for i in range(2): exec('''
class T{0}(unittest.TestCase):
    def test_2(self):
        self.assertTrue({0} == 1)
FAIL: test_2 (__main__.T0)
Traceback (most recent call last):
  File "<string>", line 4, in test_2
AssertionError: False is not true

Ran 2 tests in 0.016s
Date User Action Args
2014-08-18 00:00:14terry.reedysetrecipients: + terry.reedy, gpolo, jesstess, zach.ware, serhiy.storchaka, Lita.Cho
2014-08-18 00:00:14terry.reedysetmessageid: <>
2014-08-18 00:00:14terry.reedylinkissue21585 messages
2014-08-18 00:00:14terry.reedycreate