mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-18039 Fix PyPackageRequirementsInspectionTest
It failed because packages cache wasn't initialized before the tests and "Package requirements" inspection doesn't warn about anything in this case.
This commit is contained in:
+11
@@ -15,14 +15,25 @@
|
||||
*/
|
||||
package com.jetbrains.python.inspections;
|
||||
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.jetbrains.python.fixtures.PyTestCase;
|
||||
import com.jetbrains.python.packaging.PyPackageManager;
|
||||
import com.jetbrains.python.psi.LanguageLevel;
|
||||
import com.jetbrains.python.sdk.PythonSdkType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author vlan
|
||||
*/
|
||||
public class PyPackageRequirementsInspectionTest extends PyTestCase {
|
||||
@Override
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
final Sdk sdk = PythonSdkType.findPythonSdk(myFixture.getModule());
|
||||
assertNotNull(sdk);
|
||||
PyPackageManager.getInstance(sdk).refreshAndGetPackages(true);
|
||||
}
|
||||
|
||||
public void testPartiallySatisfiedRequirementsTxt() {
|
||||
doTest("test1.py");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user