Add pandas tags, move the test to staging

This commit is contained in:
Dmitry Trofimov
2016-06-08 10:31:16 +03:00
parent 4c38698ee5
commit 7e7451e4fd
2 changed files with 17 additions and 8 deletions
+2 -2
View File
@@ -21,8 +21,8 @@ envs {
conda "django17", "2.7", ["django==1.7"]
textfile "django17/tags.txt", "django\nskeletons"
conda "python34", "3.4", ["ipython==2.1", "django==1.6", "behave", "jinja2", "tox==2.0"]
textfile "python34/tags.txt", "python3\nipython\nipython200\nskeletons\ndjango\nbehave\ntox\njinja2\npython34\npackaging"
conda "python34", "3.4", ["ipython==2.1", "django==1.6", "behave", "jinja2", "tox==2.0", "pandas"]
textfile "python34/tags.txt", "python3\nipython\nipython200\nskeletons\ndjango\nbehave\ntox\njinja2\npython34\npackaging\npandas"
if (!Os.isFamily(Os.FAMILY_WINDOWS)) {
// jython "jython25", []
@@ -15,15 +15,20 @@
*/
package com.jetbrains.env.python;
import com.google.common.collect.ImmutableSet;
import com.intellij.xdebugger.XDebuggerTestUtil;
import com.jetbrains.env.PyEnvTestCase;
import com.jetbrains.env.Staging;
import com.jetbrains.env.python.debug.PyDebuggerTask;
import com.jetbrains.python.debugger.ArrayChunk;
import com.jetbrains.python.debugger.PyDebugValue;
import com.jetbrains.python.debugger.PyDebuggerException;
import com.jetbrains.python.debugger.array.AsyncArrayTableModel;
import org.jetbrains.annotations.NotNull;
import org.junit.Test;
import java.util.Set;
import static com.intellij.testFramework.UsefulTestCase.assertSameElements;
import static org.junit.Assert.assertEquals;
@@ -33,6 +38,7 @@ import static org.junit.Assert.assertEquals;
public class PythonDataViewerTest extends PyEnvTestCase {
@Test
@Staging
public void testDataFrameChunkRetrieval() throws Exception {
runPythonTest(new PyDebuggerTask("/debug", "test_dataframe.py") {
@Override
@@ -54,7 +60,8 @@ public class PythonDataViewerTest extends PyEnvTestCase {
ArrayChunk df2 = getDefaultChunk("df2");
assertEquals(6, df2.getColumns());
assertEquals(3, df2.getRows());
assertSameElements(df2.getColHeaders().stream().map((header-> header.getLabel())).toArray(), new String[]{"LABELS", "One_X", "One_Y", "Two_X", "Two_Y", "row"});
assertSameElements(df2.getColHeaders().stream().map((header -> header.getLabel())).toArray(),
new String[]{"LABELS", "One_X", "One_Y", "Two_X", "Two_Y", "row"});
resume();
waitForPause();
@@ -66,9 +73,6 @@ public class PythonDataViewerTest extends PyEnvTestCase {
assertEquals(16, (int)Integer.valueOf(header.getMax()));
assertEquals(1, (int)Integer.valueOf(header.getMin()));
resume();
}
private ArrayChunk getDefaultChunk(String varName) throws PyDebuggerException {
@@ -76,8 +80,13 @@ public class PythonDataViewerTest extends PyEnvTestCase {
return dbgVal.getFrameAccessor()
.getArrayItems(dbgVal, 0, 0, -1, -1, ".%5f");
}
@NotNull
@Override
public Set<String> getTags() {
return ImmutableSet.of("pandas");
}
});
}
}