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 slmnhq
Recipients michael.foord, r.david.murray, rbcollins, slmnhq
Date 2009-12-26.20:11:02
SpamBayes Score 0.0016021155
Marked as misclassified No
Message-id <1261858267.16.0.353658766041.issue7559@psf.upfronthosting.co.za>
In-reply-to
Content
Line 348 in trunk/Lib/test/test_unittest.py has a test case to
specifically test that in the described situation, the test returns an
AttributeError. Should this test be changed so that it passes if the
exception is in fact an ImportError?

   def test_loadTestsFromName__unknown_attr_name(self):
        loader = unittest.TestLoader()

        try:
            loader.loadTestsFromName('unittest.sdasfasfasdf')
        except AttributeError, e:
            self.assertEqual(str(e), "'module' object has no attribute
'sdasfasfasdf'")
        else:
            self.fail("TestLoader.loadTestsFromName failed to raise
AttributeError")
History
Date User Action Args
2009-12-26 20:11:07slmnhqsetrecipients: + slmnhq, rbcollins, r.david.murray, michael.foord
2009-12-26 20:11:07slmnhqsetmessageid: <1261858267.16.0.353658766041.issue7559@psf.upfronthosting.co.za>
2009-12-26 20:11:03slmnhqlinkissue7559 messages
2009-12-26 20:11:02slmnhqcreate