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 Dec 5, 2024
1 parent 8439170 commit ce70e6e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 19 deletions.
47 changes: 31 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,20 @@ workflows:
- test_old_pythons:
matrix:
parameters:
python_version: ["2.7", "3.5", "3.6", "3.7"]
python_version: ["2.7", "3.5"]
- test:
matrix:
parameters:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python_version:
["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
- test_old_pypy:
matrix:
parameters:
python_version: ["2.7"]
- test_pypy:
matrix:
parameters:
python_version: ["2.7", "3.7", "3.8", "3.9", "3.10"]
python_version: ["3.7", "3.8", "3.9", "3.10"]
- lint-rst
- clang-format

Expand All @@ -31,7 +36,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,30 +48,40 @@ jobs:
docker:
- image: cimg/python:<<parameters.python_version>>

test:
test_old_pypy:
<<: *old_python_tests
docker:
- image: pypy:<<parameters.python_version>>

test: &tests
parameters:
python_version:
type: string
steps:
- checkout
- run:
name: Install ciso8601
command: |
python -m venv venv
. venv/bin/activate
pip install --upgrade build
python -m build -s
pip install dist/ciso8601-*.tar.gz
- run:
name: Install testing dependencies
command: |
. venv/bin/activate
pip install pytz
- 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
python -m unittest
docker:
- image: cimg/python:<<parameters.python_version>>

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

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 ce70e6e

Please sign in to comment.