From: Morgan R. <mor...@gm...> - 2008-10-17 13:07:37
|
I've started writing unit tests for my additions now, I've got an issue though, I've updated test_crypto.py changes summarised below; ================================================ from OpenSSL.crypto import RSA, RSAType ... class RSATests(TestCase, _Python23TestCaseHelper): def test_construction(self): """ L{RSA} takes no arguments and returns an instance of L{RSAType}. """ rsaobj = RSA() self.assertTrue( isinstance(rsaobj, RSAType), "%r is of type %r, should be %r" % (rsaobj, type(rsaobj), RSAType)) def test_generate_key(self): """ L{generate_key} generates a new RSA key the given size and stores it in the internal structure """ bits = 1024 rsaobj = RSA() rsaobj.generate_key(bits) self.assertEqual(rsaobj.key_bits(), bits) ================================================ When I execute the tests only test_construction is being executed (or it's the only one appearing in the log), is there anything I need to do besides defining the test method in the test class? (apologies for the basic questions, I've never done automated unit testing in python before) Thanks, Morgan |