I have a python package where all my unittest test classes are stored in modules in a subpackage mypkg.tests. In the tests/__init__.py file I have a function called suite. I normally run these tests by calling python setup.py test which has test_suite='satpy.tests.suite'. Is it possible to run this test suite from pycharm?
The reason I have the suite function is that it only contains tests that are ready to be run from my continuous integration, but other failing tests exist in the directory (from older versions of the package). I could also see this being useful for selecting quick unittests versus long running tests. I've tried running as a script, function as nosetest or unittest configurations. I've tried adding if __name__ == "__main__": and other types of command line running methods with no success.
Is there a way to run only some tests from a pycharm run configuration?
Aucun commentaire:
Enregistrer un commentaire