From 305ecf949aca7a37c11345e53b062a093f167346 Mon Sep 17 00:00:00 2001 From: pgajdos Date: Tue, 2 Jun 2020 17:01:18 +0200 Subject: [PATCH 1/2] fallback to unittest, it is enough for python3 --- tests/test_pyclipper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_pyclipper.py b/tests/test_pyclipper.py index 15f4f79..762ec40 100644 --- a/tests/test_pyclipper.py +++ b/tests/test_pyclipper.py @@ -4,7 +4,10 @@ Tests for Pyclipper wrapper library. """ from __future__ import print_function -from unittest2 import TestCase, main +try: + from unittest2 import TestCase, main +except ImportError: + from unittest import TestCase, main import sys if sys.version_info < (3,): From a81510bebdb7bd6d8c24f3b33b08841788c65088 Mon Sep 17 00:00:00 2001 From: pgajdos Date: Thu, 16 Jul 2020 12:18:43 +0200 Subject: [PATCH 2/2] remove unittest2 from test dependencies --- .appveyor.yml | 2 +- .travis.yml | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 27dc94b..5f93ede 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -75,7 +75,7 @@ install: - "python -c \"import sys; print(sys.executable)\"" # Install build and test dependencies - - "%CMD_IN_ENV% pip install cython setuptools_scm setuptools_scm_git_archive sympy unittest2 pytest" + - "%CMD_IN_ENV% pip install cython setuptools_scm setuptools_scm_git_archive sympy pytest" build: off diff --git a/.travis.yml b/.travis.yml index 0c7c78b..9e073f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ env: # pip dependencies to _build_ project - BUILD_DEPENDS="Cython setuptools>=25 setuptools_scm setuptools_scm_git_archive" # pip dependencies to _test_ project - - TEST_DEPENDS="sympy unittest2 pytest" + - TEST_DEPENDS="sympy pytest" - PLAT=x86_64 - UNICODE_WIDTH=32 - TWINE_USERNAME="anthrotype" diff --git a/setup.py b/setup.py index bd0cd83..090122d 100755 --- a/setup.py +++ b/setup.py @@ -94,6 +94,6 @@ setup( 'cython>=0.28', 'setuptools_scm>=1.11.1', ] + pytest_runner, - tests_require=['unittest2', 'pytest'], + tests_require=['pytest'], cmdclass=cmdclass, )