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?
One thing I found it that in the particular case my Test class was from a subclass of unittest.TestCase that is defined in a local module.  There is a known bug in pycharm that has been around for years that it sometimes does not fully see a local module that is in your virtualenv in some cases like marking the imports as unknown.  There is a workaround for that which is to add either the egg for that local project or its source path to as a source in the project using it. 
When I did that workaround for the other bug the problem went away.  So it seems pycharm machinery did not recognize my Test class as a unittest.TestCase due to the other issue.
PyCharm run select unittests