From d055d648b2e56a3f4f1314b21038e51e1c3adaf9 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Thu, 14 Nov 2019 03:11:49 +0300 Subject: [PATCH] Introduced intellij.python.community.testFramework instead of depending on intellij.python.tools Module intellij.python.tools depends explicitly on PyCharm Community which leads to errors when you try to run Python Community tests in the context of any other IDE. This commit introduces a testFramework module for Python that now contains code from intellij.python.tools necessary for running tests. GitOrigin-RevId: 9789469edc396a8b0f7408d453017a5b4e1eebc2 --- .idea/modules.xml | 1 + .../intellij.python.community.testFramework.iml | 14 ++++++++++++++ .../src/com/jetbrains/python/tools/Utils.kt | 16 +--------------- .../python/tools/sdkTools/PySdkTools.java | 0 .../python/tools/sdkTools/SdkCreationType.java | 0 .../testSrc/intellij.python.community.tests.iml | 4 +++- python/tools/intellij.python.tools.iml | 1 + .../python/tools/sdkTools/package-info.java | 8 -------- 8 files changed, 20 insertions(+), 24 deletions(-) create mode 100644 python/testFramework/intellij.python.community.testFramework.iml rename python/{tools => testFramework}/src/com/jetbrains/python/tools/Utils.kt (75%) rename python/{tools => testFramework}/src/com/jetbrains/python/tools/sdkTools/PySdkTools.java (100%) rename python/{tools => testFramework}/src/com/jetbrains/python/tools/sdkTools/SdkCreationType.java (100%) delete mode 100644 python/tools/src/com/jetbrains/python/tools/sdkTools/package-info.java diff --git a/.idea/modules.xml b/.idea/modules.xml index bb1ba6ad2d39..3ac6dfbe667a 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -709,6 +709,7 @@ + diff --git a/python/testFramework/intellij.python.community.testFramework.iml b/python/testFramework/intellij.python.community.testFramework.iml new file mode 100644 index 000000000000..630498954453 --- /dev/null +++ b/python/testFramework/intellij.python.community.testFramework.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/python/tools/src/com/jetbrains/python/tools/Utils.kt b/python/testFramework/src/com/jetbrains/python/tools/Utils.kt similarity index 75% rename from python/tools/src/com/jetbrains/python/tools/Utils.kt rename to python/testFramework/src/com/jetbrains/python/tools/Utils.kt index 953c13bce4d4..d4fe47ab9690 100644 --- a/python/tools/src/com/jetbrains/python/tools/Utils.kt +++ b/python/testFramework/src/com/jetbrains/python/tools/Utils.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 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. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.jetbrains.python.tools import com.intellij.openapi.application.impl.ApplicationInfoImpl diff --git a/python/tools/src/com/jetbrains/python/tools/sdkTools/PySdkTools.java b/python/testFramework/src/com/jetbrains/python/tools/sdkTools/PySdkTools.java similarity index 100% rename from python/tools/src/com/jetbrains/python/tools/sdkTools/PySdkTools.java rename to python/testFramework/src/com/jetbrains/python/tools/sdkTools/PySdkTools.java diff --git a/python/tools/src/com/jetbrains/python/tools/sdkTools/SdkCreationType.java b/python/testFramework/src/com/jetbrains/python/tools/sdkTools/SdkCreationType.java similarity index 100% rename from python/tools/src/com/jetbrains/python/tools/sdkTools/SdkCreationType.java rename to python/testFramework/src/com/jetbrains/python/tools/sdkTools/SdkCreationType.java diff --git a/python/testSrc/intellij.python.community.tests.iml b/python/testSrc/intellij.python.community.tests.iml index 2509277c4f4d..70a804b8175c 100644 --- a/python/testSrc/intellij.python.community.tests.iml +++ b/python/testSrc/intellij.python.community.tests.iml @@ -21,14 +21,16 @@ - + + + \ No newline at end of file diff --git a/python/tools/intellij.python.tools.iml b/python/tools/intellij.python.tools.iml index 7b00ea214067..2ec005ec5812 100644 --- a/python/tools/intellij.python.tools.iml +++ b/python/tools/intellij.python.tools.iml @@ -20,5 +20,6 @@ + \ No newline at end of file diff --git a/python/tools/src/com/jetbrains/python/tools/sdkTools/package-info.java b/python/tools/src/com/jetbrains/python/tools/sdkTools/package-info.java deleted file mode 100644 index 71abb64f6364..000000000000 --- a/python/tools/src/com/jetbrains/python/tools/sdkTools/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. - -/** - * Engine to create SDK in tests. - * See {@link com.jetbrains.python.tools.sdkTools.PySdkTools} - * @author Ilya.Kazakevich - */ -package com.jetbrains.python.tools.sdkTools; \ No newline at end of file