Код: Выделить всё
python -m unittest discover -s src -p "tests.py"
Ran 0 tests in 0.000s
OK
Код: Выделить всё
import unittest
def main():
unittest.main()
if __name__ == '__main__':
main()
Код: Выделить всё
import unittest
from Tools import Tools
class TestSomething(unittest.TestCase):
def setUp(self):
self.logger = Tools.get_logger(__file__)
self.logger.info("here")
def test_something(self):
....
Разве мы не можем разделить тестовые модули на классы?< /п>
Подробнее здесь: https://stackoverflow.com/questions/790 ... ns-0-tests