In testsuite/__init__.py
, I write this:
import unittest
def suite():
from my_module.testsuite import (
shell_command,
shell_command_on_jinja,
workflow
)
suite = unittest.TestSuite()
suite.addTest(shell_command.suite())
suite.addTest(shell_command_on_jinja.suite())
suite.addTest(workflow.suite())
return suite
In terminal, I can execute the test suite like this:
python3 -m unittest testsuite.suite
However, I don't know how to config the test for Pycharm/InteliJ. I add a configuration under Python's test
and set Test
to Function
, Script
to my_module/testsuite/__init__.py
, and Function
to suite
and then run it. But it doesn't work. Does anyone have ideas about this? Thanks!