标签: unit-testing assert
这有效:
class TestSequenceFunctions(unittest.TestCase): def test_choice(self): self.assertEquals(1, 1, 'they are equal!') class OtherClass ( val ):
但我想在OtherClass类中使用assertEquals并从TestSequenceFunctions类中调用它。但它会产生错误:“全局名称”自我“未定义”。请帮忙;)