blob: bfc1a688ebfa8d8aac094be4aeda04b018000601 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
package com.jetbrains.env;
import com.google.common.collect.Sets;
import com.intellij.openapi.util.io.FileUtil;
import java.util.Set;
/**
* @author traff
*/
public abstract class PyTestTask {
private String myWorkingFolder;
private String myScriptName;
private String myScriptParameters;
public void setWorkingFolder(String workingFolder) {
myWorkingFolder = workingFolder;
}
public void setScriptName(String scriptName) {
myScriptName = scriptName;
}
public void setScriptParameters(String scriptParameters) {
myScriptParameters = scriptParameters;
}
public void setUp(String testName) throws Exception {
}
public void tearDown() throws Exception {
}
/**
* Run test on certain SDK path.
* To create SDK from path, use {@link PyExecutionFixtureTestTask#createTempSdk(String, com.jetbrains.python.sdkTools.SdkCreationType)}
*
* @param sdkHome sdk path
*/
public abstract void runTestOn(String sdkHome) throws Exception;
public void before() throws Exception {
}
public void testing() throws Exception {
}
public void after() throws Exception {
}
public void useNormalTimeout() {
}
public void useLongTimeout() {
}
public String getScriptName() {
return myScriptName;
}
public String getScriptPath() {
return getFilePath(myScriptName);
}
public String getFilePath(String scriptName) {
return FileUtil
.toSystemDependentName(myWorkingFolder.endsWith("/") ? myWorkingFolder + scriptName : myWorkingFolder + "/" + scriptName);
}
public String getScriptParameters() {
return myScriptParameters;
}
public String getWorkingFolder() {
return myWorkingFolder;
}
public Set<String> getTags() {
return Sets.newHashSet();
}
}
|