1

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 suiteand then run it. But it doesn't work. Does anyone have ideas about this? Thanks!

4

1 回答 1

0

It seems that PyCharm doesn't support this now. Please check the following thread.

http://forum.jetbrains.com/thread/PyCharm-1116

于 2013-11-14T02:56:46.713 回答