我有以下文件:
hello.py:
class Say():
def __init__(self):
pass
def hello(self):
return "hello"
def whatever(self, words):
return words
test_say.py:
import unittest
class TestSay(unittest.TestCase):
def test_hello(self):
self.assertEqual(1, 1)
def test_whatever(self):
self.assertEqual(1, 1)
def main():
unittest.main()
if __name__ == '__main__':
main()
我跑的时候:
$ coverage.py hello.py
它没有显示与班级相关的测试。我错过了什么?