-
Notifications
You must be signed in to change notification settings - Fork 342
/
conftest.py
36 lines (32 loc) · 1.14 KB
/
conftest.py
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
import pytest
def pytest_collection_modifyitems(config, items):
try:
import pandas
except ImportError:
pandas = None
try:
import cesium
except ImportError:
cesium = None
if pandas is None:
skip_marker = pytest.mark.skip(reason="pandas not installed!")
for item in items:
if item.name in [
"tslearn.utils.from_tsfresh_dataset",
"tslearn.utils.to_tsfresh_dataset",
"tslearn.utils.from_sktime_dataset",
"tslearn.utils.to_sktime_dataset",
"tslearn.utils.from_pyflux_dataset",
"tslearn.utils.to_pyflux_dataset",
"tslearn.utils.from_cesium_dataset",
"tslearn.utils.to_cesium_dataset",
]:
item.add_marker(skip_marker)
if cesium is None:
skip_marker = pytest.mark.skip(reason="cesium not installed!")
for item in items:
if item.name in [
"tslearn.utils.to_cesium_dataset",
"tslearn.utils.from_cesium_dataset",
]:
item.add_marker(skip_marker)