mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Warn user if legacy runner is used, remove outdated EP, mark redundant interface as deprecated
GitOrigin-RevId: 9ead5bcf99fd87fb5bde6d6fa88426ddfefebab8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a45d9516d6
commit
cb899e1dad
@@ -1,5 +1,9 @@
|
||||
import sys
|
||||
import os
|
||||
import sys
|
||||
sys.stderr.write("Warning: You are using test runners in legacy mode\n. "
|
||||
"That means you have 'python.tests.enableUniversalTests=false' in registry.\n"
|
||||
"This mode will be dropped in 2021. Consider removing this entry from registry and migrating to new test runners")
|
||||
|
||||
helpers_dir = os.getenv("PYCHARM_HELPERS_DIR", sys.path[0])
|
||||
if sys.path[0] != helpers_dir:
|
||||
@@ -93,4 +97,4 @@ def process_args():
|
||||
TestProgram(argv=argv, config=config, exit=False)
|
||||
|
||||
if __name__ == "__main__":
|
||||
process_args()
|
||||
process_args()
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import sys
|
||||
|
||||
sys.stderr.write("Warning: You are using test runners in legacy mode\n. "
|
||||
"That means you have 'python.tests.enableUniversalTests=false' in registry.\n"
|
||||
"This mode will be dropped in 2021. Consider removing this entry from registry and migrating to new test runners")
|
||||
has_pytest = False
|
||||
#there is the difference between 1.3.4 and 2.0.2 versions
|
||||
#Since version 1.4, the testing tool "py.test" is part of its own pytest distribution.
|
||||
@@ -57,4 +59,4 @@ else:
|
||||
return exitstatus
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
|
||||
@@ -2,7 +2,10 @@ import sys
|
||||
import imp
|
||||
import os
|
||||
import fnmatch
|
||||
|
||||
import sys
|
||||
sys.stderr.write("Warning: You are using test runners in legacy mode\n. "
|
||||
"That means you have 'python.tests.enableUniversalTests=false' in registry.\n"
|
||||
"This mode will be dropped in 2021. Consider removing this entry from registry and migrating to new test runners")
|
||||
roots = sys.path[:]
|
||||
|
||||
helpers_dir = os.getenv("PYCHARM_HELPERS_DIR", sys.path[0])
|
||||
|
||||
@@ -16,18 +16,19 @@
|
||||
package com.jetbrains.python.testing;
|
||||
|
||||
import com.intellij.execution.Location;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.jetbrains.python.run.RunnableScriptFilter;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* @author Ilya.Kazakevich
|
||||
*/
|
||||
public class PythonUnitTestRunnableScriptFilter {
|
||||
public final class PythonUnitTestRunnableScriptFilter {
|
||||
private PythonUnitTestRunnableScriptFilter(){}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RunnableUnitTestFilter#isRunnableUnitTest(PsiFile, Module)} instead. Delete after 2017.2
|
||||
* @deprecated Use {@link RunnableScriptFilter#isIfNameMain(Location)} instead.
|
||||
*/
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.1")
|
||||
@Deprecated
|
||||
public static boolean isIfNameMain(Location location) {
|
||||
return RunnableScriptFilter.isIfNameMain(location);
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.jetbrains.python.testing;
|
||||
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Filters out Python unit tests for which it doesn't make sense to run the standard unit test configuration,
|
||||
* and which are (possibly) run by other configurations instead.
|
||||
*
|
||||
* @author yole
|
||||
*/
|
||||
public interface RunnableUnitTestFilter {
|
||||
ExtensionPointName<RunnableUnitTestFilter> EP_NAME = ExtensionPointName.create("Pythonid.runnableUnitTestFilter");
|
||||
|
||||
boolean isRunnableUnitTest(PsiFile script, @NotNull Module module);
|
||||
}
|
||||
Reference in New Issue
Block a user