Eu estou tentando adicionar um atributo unittest para um objeto em Python
class Boy:
def run(self, args):
print(Hello)
class BoyTest(unittest.TestCase)
def test(self)
self.assertEqual('2' , '2')
def self_test():
suite = unittest.TestSuite()
loader = unittest.TestLoader()
suite.addTest(loader.loadTestsFromTestCase(Boy.BoyTest))
return suite
No entanto, eu continuo recebendo AttributeError: class Boy has no attribute 'BoyTest'
quando eu ligar self_test()
. Por quê?