Skip to content

Commit

Permalink
Use unittest instead of setuptools
Browse files Browse the repository at this point in the history
  • Loading branch information
movermeyer committed Nov 10, 2024
1 parent 08f4a50 commit a8013a3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
37 changes: 20 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ workflows:
matrix:
parameters:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
- test_old_pypy:
matrix:
parameters:
python_version: ["2.7", "3.7"]
- test_pypy:
matrix:
parameters:
python_version: ["2.7", "3.7", "3.8", "3.9", "3.10"]
python_version: ["3.8", "3.9", "3.10"]
- lint-rst
- clang-format

Expand All @@ -31,7 +35,7 @@ jobs:
docker:
- image: circleci/python:3.4

test_old_pythons:
test_old_pythons: &old_python_tests
parameters:
python_version:
type: string
Expand All @@ -43,32 +47,31 @@ jobs:
docker:
- image: cimg/python:<<parameters.python_version>>

test:
test_old_pypy: *old_python_tests

test: &tests
parameters:
python_version:
type: string
steps:
- checkout
- run:
name: Install tox
command: |
python3 -m venv venv
. venv/bin/activate
pip install tox
- run:
name: Test
# setuptools dropped support for being a test runner in v72.0.0
command: |
pip install --force-reinstall 'setuptools==71.1.0'
python setup.py test
. venv/bin/activate
TOX_ENV_PREFIX=`echo "<<parameters.python_version>>" | tr -d '.' | sed "s/^/py/"`
tox -e "${TOX_ENV_PREFIX}-caching_enabled"
tox -e "${TOX_ENV_PREFIX}-caching_disabled"
docker:
- image: cimg/python:<<parameters.python_version>>

test_pypy:
parameters:
python_version:
type: string
steps:
- checkout
- run:
name: Test
command: pypy setup.py test
docker:
- image: pypy:<<parameters.python_version>>
test_pypy: *tests

lint-rst:
working_directory: ~/code
Expand Down
5 changes: 2 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
requires =
tox>=4
envlist = {py27,py34,py35,py36,py37,py38,py39,py310,py311,py312}-caching_{enabled,disabled}
envlist = {py313,py312,py311,py310,py39,py38}-caching_{enabled,disabled}

[testenv]
package = sdist
Expand All @@ -11,5 +11,4 @@ setenv =
caching_disabled: CISO8601_CACHING_ENABLED = 0
deps =
pytz
nose
commands=nosetests
commands=python -m unittest

0 comments on commit a8013a3

Please sign in to comment.