void (@NotNull PyTestTask testTask, @NotNull String testName) { Assume.assumeFalse("Running under teamcity but not by Env configuration. Test seems to be launched by accident, skip it.", UsefulTestCase.IS_UNDER_TEAMCITY && !SETTINGS.isEnvConfiguration()); List<String> roots = getPythonRoots(); /* * <p> * {@link org.junit.AssumptionViolatedException} here means this test must be <strong>skipped</strong>. * TeamCity supports this (if not you should create and issue about that). * Idea does not support it for JUnit 3, while JUnit 4 must be supported. * </p> *<p> * It this error brakes your test, please <strong>do not</strong> revert. Instead, do the following: * <ol> * <li>Make sure {@link com.jetbrains.env.python} tests are <strong>excluded</strong> from your configuration (unless you are * PyCharm developer)</li> * <li>Check that your environment supports {@link AssumptionViolatedException}. * JUnit 4 was created about 10 years ago, so fixing environment is much better approach than hacky "return;" here. * </li> * </ol> *</p> */ Assume.assumeFalse(testName + ": environments are not defined. Skipping. \nChecks logs for settings that lead to this situation", roots.isEmpty()); doRunTests(testTask, testName, roots); }