Skip to content

Commit 3972d97

Browse files
committed
Sorted imports and applied black formatting.
1 parent 3d64b7d commit 3972d97

6 files changed

Lines changed: 10 additions & 14 deletions

File tree

tests/test_1_smoketest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""test suite for rtanalysis
22
"""
3-
43
import pytest
54
from rtanalysis.rtanalysis import RTAnalysis
65

6+
77
def test_rtanalysis_smoke():
88
rta = RTAnalysis()
99
assert rta is not None

tests/test_2_fit.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
- in this test, we will create a simulated dataset and fit
44
it, ensuring that the answers are correct
55
"""
6-
76
import numpy as np
8-
from rtanalysis.rtanalysis import RTAnalysis
97
from rtanalysis.generate_testdata import generate_test_df
8+
from rtanalysis.rtanalysis import RTAnalysis
109

1110

1211
def test_rtanalysis_fit():

tests/test_3_type_fail.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
test for rtanalysis
33
- in this test, we will ensure that the function raises a ValueError
44
"""
5-
65
import pytest
7-
from rtanalysis.rtanalysis import RTAnalysis
86
from rtanalysis.generate_testdata import generate_test_df
7+
from rtanalysis.rtanalysis import RTAnalysis
98

109

1110
# This xfail decorator tells pytest to run the test

tests/test_3_type_success.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
test for rtanalysis
33
- in this test, we will ensure that the function raises a ValueError
44
"""
5-
65
import pytest
7-
from rtanalysis.rtanalysis import RTAnalysis
86
from rtanalysis.generate_testdata import generate_test_df
7+
from rtanalysis.rtanalysis import RTAnalysis
98

109

1110
def test_dataframe_error_with_raises():

tests/test_4_fixture.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
and use it across multiple tests
55
- we also create a separate fixture to hold the parameters
66
"""
7-
8-
import pytest
97
import numpy as np
10-
from rtanalysis.rtanalysis import RTAnalysis
8+
import pytest
119
from rtanalysis.generate_testdata import generate_test_df
10+
from rtanalysis.rtanalysis import RTAnalysis
1211

1312

1413
@pytest.fixture

tests/test_5_parametric.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
and make sure that the function properly raises
55
and exception is accuracy is zero
66
"""
7-
8-
import pytest
97
import numpy as np
10-
from rtanalysis.rtanalysis import RTAnalysis
8+
import pytest
119
from rtanalysis.generate_testdata import generate_test_df
10+
from rtanalysis.rtanalysis import RTAnalysis
11+
1212

1313
@pytest.mark.parametrize("meanRT, sdRT, meanAcc",
1414
[(1.5, 1.0, 0.9), (1500, 1000, 0.9),
@@ -22,4 +22,4 @@ def test_rtanalysis_parameteric(meanRT, sdRT, meanAcc):
2222
assert np.allclose(meanAcc, rta.meanacc_)
2323
else:
2424
with pytest.raises(ValueError):
25-
rta.fit(test_df.rt, test_df.accuracy)
25+
rta.fit(test_df.rt, test_df.accuracy)

0 commit comments

Comments
 (0)