File tree 5 files changed +23
-23
lines changed 5 files changed +23
-23
lines changed Original file line number Diff line number Diff line change 1
1
.PHONY : all clean test
2
- PYTHON =python
3
- NOSETESTS =nosetests
4
-
5
- all :
6
- $(PYTHON ) setup.py build_ext --inplace
7
2
8
3
clean :
9
4
find . -name " *.so" -o -name " *.pyc" -o -name " *.md5" -o -name " *.pyd" -o -name " *~" | xargs rm -f
@@ -17,21 +12,15 @@ clean:
17
12
rm -rf doc/modules
18
13
rm -rf examples/.ipynb_checkpoints
19
14
20
- in : inplace # just a shortcut
21
- inplace :
22
- $(PYTHON ) setup.py build_ext -i
23
-
24
15
test-code :
25
- $( NOSETESTS ) -s -v imblearn
16
+ py.test imblearn
26
17
27
18
test-doc :
28
- ifeq ($(BITS ) ,64)
29
- $(NOSETESTS) -s -v doc/*.rst
30
- endif
19
+ py.test doc/* .rst
31
20
32
21
test-coverage :
33
22
rm -rf coverage .coverage
34
- $( NOSETESTS ) imblearn -s -v --with-coverage --cover-package= imblearn
23
+ py.test --cov=imblearn imblearn
35
24
36
25
test : test-coverage test-doc
37
26
44
33
code-analysis :
45
34
flake8 imblearn | grep -v __init__
46
35
pylint -E imblearn/ -d E1103,E0611,E1101
47
-
48
- flake8-diff :
49
- ./build_tools/travis/flake8_diff.sh
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ install:
39
39
- " conda install pip numpy scipy scikit-learn=0.19.0 nose wheel matplotlib -y -q"
40
40
41
41
# Install other nilearn dependencies
42
- - " pip install coverage nose-timer"
42
+ - " pip install coverage nose-timer pytest pytest-cov "
43
43
- " python setup.py bdist_wheel"
44
44
- ps : " ls dist"
45
45
@@ -50,10 +50,7 @@ install:
50
50
build : false
51
51
52
52
test_script :
53
- # Change to a non-source folder to make sure we run the tests on the
54
- # installed library.
55
- - " cd C:\\ "
56
- - " python -c \" import nose; nose.main()\" -v -s --with-timer --timer-top-n 50 imblearn"
53
+ - powershell ./build_tools/appveyor/test.ps1
57
54
58
55
artifacts :
59
56
# Archive the generated packages in the ci.appveyor.com build report.
Original file line number Diff line number Diff line change
1
+ # Change to a non-source folder to make sure we run the tests on the
2
+ # installed library.
3
+ - " cd C:\\"
4
+
5
+ $installed_imblearn_folder = $ (python - c " import os; os.chdir('c:/'); import imblearn;\
6
+ print(os.path.dirname(pydicom.__file__))" )
7
+ echo " imblearn found in: $installed_imblearn_folder "
8
+
9
+ # --pyargs argument is used to make sure we run the tests on the
10
+ # installed package rather than on the local folder
11
+ py.test -- pyargs imblearn $installed_imblearn_folder
12
+ exit $LastExitCode
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ run_tests(){
21
21
python -c " import scipy; print('scipy %s' % scipy.__version__)"
22
22
python -c " import multiprocessing as mp; print('%d CPUs' % mp.cpu_count())"
23
23
24
- nosetests -v -s --with-coverage --cover-package= $MODULE $MODULE
24
+ py.test --cov= $MODULE -r sx --pyargs $MODULE
25
25
26
26
# Test doc
27
27
cd $OLDPWD
Original file line number Diff line number Diff line change @@ -32,3 +32,8 @@ doctest-tests = 1
32
32
doctest-extension = rst
33
33
doctest-fixtures = _fixture
34
34
35
+ [tool:pytest]
36
+ # disable-pytest-warnings should be removed once we drop nose and we
37
+ # rewrite tests using yield with parametrize
38
+ addopts =
39
+ --doctest-modules
You can’t perform that action at this time.
0 commit comments