From f5d5b0c9efebd787ac0018834dce1cd1c23dd8a2 Mon Sep 17 00:00:00 2001 From: Michael Overmeyer Date: Sun, 10 Nov 2024 15:00:22 -0500 Subject: [PATCH] Use `unittest` instead of `setuptools` --- .circleci/config.yml | 47 +++++++++++++++++++++++++++++--------------- tox.ini | 5 ++--- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 79f86c1..7fc907a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 @@ -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 @@ -43,30 +48,40 @@ jobs: docker: - image: cimg/python:<> - test: + test_old_pypy: + <<: *old_python_tests + docker: + - image: pypy:<> + + 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:<> test_pypy: - parameters: - python_version: - type: string - steps: - - checkout - - run: - name: Test - command: pypy setup.py test + <<: *tests docker: - image: pypy:<> diff --git a/tox.ini b/tox.ini index f0678f0..d4caa51 100644 --- a/tox.ini +++ b/tox.ini @@ -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 @@ -11,5 +11,4 @@ setenv = caching_disabled: CISO8601_CACHING_ENABLED = 0 deps = pytz - nose -commands=nosetests +commands=python -m unittest