This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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 <1408320014.24.0.263381361741.issue21585@psf.upfronthosting.co.za>
In-reply-to
Content
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)
'''.format(i))
unittest.main()
>>>
F.
======================================================================
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
History
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: <1408320014.24.0.263381361741.issue21585@psf.upfronthosting.co.za>
2014-08-18 00:00:14terry.reedylinkissue21585 messages
2014-08-18 00:00:14terry.reedycreate