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
|
/*
* Created on May 5, 2005
*
* @author Fabio Zadrozny
*/
package org.python.pydev.runners;
import java.io.File;
import java.io.IOException;
import junit.framework.TestCase;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
import org.python.pydev.core.TestDependent;
import org.python.pydev.plugin.PydevPlugin;
import org.python.pydev.runners.SimplePythonRunner;
import org.python.pydev.ui.BundleInfoStub;
/**
* @author Fabio Zadrozny
*/
public class SimplePythonRunnerTest extends TestCase {
public static void main(String[] args) {
junit.textui.TestRunner.run(SimplePythonRunnerTest.class);
}
/*
* @see TestCase#setUp()
*/
protected void setUp() throws Exception {
super.setUp();
PydevPlugin.setBundleInfo(new BundleInfoStub());
}
/*
* @see TestCase#tearDown()
*/
protected void tearDown() throws Exception {
super.tearDown();
}
/**
* @throws CoreException
* @throws IOException
*
*/
public void testEnv() throws CoreException, IOException {
File relativePath = PydevPlugin.getBundleInfo().getRelativePath(new Path("PySrc/interpreterInfo.py"));
String string = new SimplePythonRunner().runAndGetOutput(TestDependent.PYTHON_EXE+" "+relativePath.getCanonicalPath(), null).o1;
assertNotNull(string);
//System.out.println(string);
}
}
|