File tree 2 files changed +11
-1
lines changed
.continuous-integration/travis
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ $CONDA_INSTALL pytest Cython jinja2 psutil
30
30
# OPTIONAL DEPENDENCIES
31
31
if $OPTIONAL_DEPS
32
32
then
33
- $CONDA_INSTALL scipy h5py matplotlib pyyaml scikit-image
33
+ $CONDA_INSTALL scipy h5py matplotlib pyyaml scikit-image pandas
34
34
pip install beautifulsoup4
35
35
fi
36
36
Original file line number Diff line number Diff line change 15
15
from ... import units as u
16
16
from .conftest import MaskedTable
17
17
18
+ try :
19
+ import pandas
20
+ except ImportError :
21
+ HAS_PANDAS = False
22
+ else :
23
+ HAS_PANDAS = True
24
+
18
25
19
26
class SetupData (object ):
20
27
def _setup (self , table_types ):
@@ -1402,6 +1409,7 @@ def test_table_init_from_degenerate_arrays(table_types):
1402
1409
1403
1410
class TestPandas (object ):
1404
1411
1412
+ @pytest .mark .skipif ('not HAS_PANDAS' )
1405
1413
def test_simple (self ):
1406
1414
1407
1415
from pandas import DataFrame
@@ -1436,6 +1444,7 @@ def test_simple(self):
1436
1444
else :
1437
1445
assert_allclose (t [column ], t2 [column ])
1438
1446
1447
+ @pytest .mark .skipif ('not HAS_PANDAS' )
1439
1448
def test_2d (self ):
1440
1449
1441
1450
from pandas import DataFrame
@@ -1448,6 +1457,7 @@ def test_2d(self):
1448
1457
d = t .to_pandas ()
1449
1458
assert exc .value .args [0 ] == "Cannot convert a table with multi-dimensional columns to a pandas DataFrame"
1450
1459
1460
+ @pytest .mark .skipif ('not HAS_PANDAS' )
1451
1461
def test_mixin (self ):
1452
1462
1453
1463
from pandas import DataFrame
You can’t perform that action at this time.
0 commit comments