diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index b814127..b959aa5 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -76,21 +76,21 @@ jobs: ant all cd tests - nosetests -v + pytest -v - name: test if: matrix.os == 'ubuntu-latest' run: | ant all cd tests - CLASSPATH=../build/test-classes:../build/classes nosetests -v + CLASSPATH=../build/test-classes:../build/classes pytest -v - name: test if: matrix.os == 'macOs-latest' run: | ant all cd tests - CLASSPATH=../build/test-classes:../build/classes python -m nose -v + CLASSPATH=../build/test-classes:../build/classes python -m pytest -v # - name: coveralls # run: python -m coveralls diff --git a/Makefile b/Makefile index 74954a3..bc20867 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ all: build_ext .PHONY: build_ext tests PYTHON=python -NOSETESTS=nosetests +PYTEST=pytest JAVA_TARGET ?= $(shell $(PYTHON) -c "import re; print('1.6' if int(re.findall(r'\d+', '$(shell javac -version 2>&1)')[0]) < 12 else '1.7')" ) JAVAC_OPTS=-target $(JAVA_TARGET) -source $(JAVA_TARGET) @@ -13,7 +13,7 @@ ANT=ant -Dant.build.javac.source=$(JAVA_TARGET) -Dant.build.javac.target=$(JAVA_ build_ext: $(ANT) all - $(PYTHON) setup.py build_ext --inplace -f -g + $(PYTHON) setup.py build_ext --inplace -g clean: $(ANT) clean @@ -25,4 +25,4 @@ html: # for use in travis; tests whatever you got. # use PYTHON3=1 to force python3 in other environments. tests: - (cd tests; env CLASSPATH=../build/test-classes:../build/classes PYTHONPATH=..:$(PYTHONPATH) $(NOSETESTS) -v) + (cd tests; env CLASSPATH=../build/test-classes:../build/classes PYTHONPATH=..:$(PYTHONPATH) $(PYTEST) -v) diff --git a/setup.py b/setup.py index dda0a51..04d25b1 100644 --- a/setup.py +++ b/setup.py @@ -120,7 +120,7 @@ setup( ) ], extras_require={ - 'dev': ['nose', 'wheel', 'pytest-cov', 'pycodestyle'], + 'dev': ['pytest', 'wheel', 'pytest-cov', 'pycodestyle'], 'ci': ['coveralls', 'pytest-rerunfailures', 'setuptools>=34.4.0'], }, **SETUP_KWARGS diff --git a/tests/test_proxy.py b/tests/test_proxy.py index 55bdc58..0e8dc79 100644 --- a/tests/test_proxy.py +++ b/tests/test_proxy.py @@ -5,7 +5,6 @@ from six.moves import range import sys from jnius import autoclass, java_method, PythonJavaClass, cast -from nose.tools import * print('1: declare a TestImplem that implement Collection')