Skip to content

Commit

Permalink
switch from nose to pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
tshirtman committed Dec 5, 2019
1 parent e685086 commit eae4f22
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def compile_native_invocation_handler(*possible_homes):
)
],
extras_require={
'dev': ['nose', 'wheel', 'pytest-cov', 'pycodestyle'],
'dev': ['pytest', 'wheel', 'pytest-cov', 'pycodestyle'],
'ci': ['coveralls', 'pytest-rerunfailures', 'setuptools>=34.4.0'],
},
**SETUP_KWARGS
Expand Down
1 change: 0 additions & 1 deletion tests/test_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import sys

from jnius import autoclass, java_method, PythonJavaClass, cast
from nose.tools import *

print('1: declare a TestImplem that implement Collection')

Expand Down

0 comments on commit eae4f22

Please sign in to comment.