Salman Haq <salman....@gmail.com> added the comment:

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")

----------
nosy: +slmnhq

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7559>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to