Skip to content

Commit 9d7711d

Browse files
committed
Initial tests.
1 parent 3072ce7 commit 9d7711d

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
# from codonpython.suppression import suppression
2-
import pandas as pd
1+
from codonPython.suppression import suppress_value
32
import pytest
43

54
@pytest.mark.parametrize("to_suppress, expected", [
6-
(
7-
pd.DataFrame({"count":[0,2,4,6,8,10,101,1001]}),
8-
pd.DataFrame({"count":[0,"*","*","*",10,10,100,1000]})
9-
)
5+
(0, 0),
6+
(2, "*"),
7+
(5, "*"),
8+
(8, 10),
9+
(14, 15),
10+
(57, 60),
11+
(10023, 10025)
1012
])
11-
def test_supression_BAU(to_generate, random_state, expected):
12-
assert expected == suppression(to_generate, random_state=random_state)
13+
def test_suppress_value_BAU(to_suppress, expected):
14+
assert expected == suppress_value(to_suppress)
1315

1416
@pytest.mark.parametrize("to_suppress", [
15-
pd.DataFrame({"count":[0,-2,4,6,8,10,101,1001]}),
16-
pd.DataFrame({"count":[0,2,4,6,8,10,101,100000000]}),
17-
pd.DataFrame({"count":[0,2.2,4,6,8,10,101,1001]})
17+
-1,
18+
4.2,
19+
100000001
1820
])
19-
def test_supression_valueErrors(to_generate):
21+
def test_suppress_value_valueErrors(to_suppress):
2022
with pytest.raises(ValueError):
21-
suppression(to_generate)
23+
suppress_value(to_suppress)

0 commit comments

Comments
 (0)