Skip to content

Commit ba1df1a

Browse files
committed
fix tests
1 parent b62646f commit ba1df1a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

test/gdsctools/test_anova.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from gdsctools.anova import ANOVA
22
from gdsctools import gdsctools_data
33
import pandas as pd
4-
from easydev import assert_list_almost_equal
54
from gdsctools import ic50_test
5+
import pytest
66

77
import warnings
88
warnings.filterwarnings(action="ignore")
@@ -127,6 +127,11 @@ def test_odof_with_without_media():
127127
assert_almost_equal(dd2['tissue']- 1.5729157319290974e-44, delta=1e-50)
128128

129129

130+
def assert_list_almost_equal(x, y, deltas=1e-10):
131+
for a,b in zip(x,y):
132+
assert pytest.approx(a-b, deltas)
133+
134+
130135
def test_anova_summary():
131136
an = ANOVA(ic50_test)
132137
# by default regression includes + msi + feature

test/gdsctools/test_cosmictools.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
from gdsctools.datasets import cosmic_builder_test
33
import pytest
44

5+
import os
6+
skiptravis = pytest.mark.skipif( "TRAVIS_PYTHON_VERSION" in os.environ,
7+
reason="On travis")
8+
9+
510

611
def test_cosmic_info():
712
c = COSMICInfo()
@@ -20,7 +25,7 @@ def test_cosmic():
2025
r.get(1000000000)
2126

2227

23-
@attr("onweb")
28+
@skiptravis
2429
def test_onweb():
2530
r = COSMICInfo()
2631
r.on_web(924100)

0 commit comments

Comments
 (0)