From d90480003939c1623d08b56e5239632fee071fb9 Mon Sep 17 00:00:00 2001 From: alvarogf97 Date: Mon, 29 Jul 2024 12:55:15 +0200 Subject: [PATCH] Replace setup.py test for pytest --- .github/workflows/ci.yml | 4 ++-- appveyor.yml | 3 ++- tox.ini | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85c149c0..bb050dd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,7 +111,7 @@ jobs: - name: Set up Python packages run: | python -m pip install -U ${{ startsWith(matrix.python-version, '2.7') && '"pip<21" "setuptools<45"' || 'pip setuptools' }} - python -m pip install -U wheel tox virtualenv -r requirements.txt + python -m pip install -U wheel tox virtualenv pytest -r requirements.txt - name: Set up Lua ${{ matrix.lua-version }} if: contains(matrix.os, 'ubuntu') && matrix.lua-version != 'bundle' @@ -125,7 +125,7 @@ jobs: LDFLAGS: ${{ env.CFLAGS_LTO }} - name: Run tests - run: python setup.py test + run: pytest lupa continue-on-error: ${{ contains(matrix.python-version, 'pypy') }} env: SETUP_OPTIONS: ${{ !contains(matrix.lua-version, 'luajit') && (contains(matrix.lua-version, 'bundle') && '--use-bundle' || '--no-luajit') || '' }} diff --git a/appveyor.yml b/appveyor.yml index fa0e4cd4..797e9e81 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,6 +27,7 @@ install: - SET PATH=C:\\Python%PYTHON%;c:\\Python%PYTHON%\\scripts;%PATH% - python -m pip.__main__ install -U pip wheel setuptools - pip install -r requirements.txt + - pip install pytest - git submodule update --init --recursive build: off @@ -37,7 +38,7 @@ build_script: test: off test_script: - - python -u setup.py test + - pytest lupa artifacts: - path: dist/*.whl diff --git a/tox.ini b/tox.ini index 2bd84e89..a9389f18 100644 --- a/tox.ini +++ b/tox.ini @@ -13,9 +13,10 @@ envlist= deps= Cython setuptools + pytest passenv= SETUP_OPTIONS commands= {envpython} setup.py --with-cython {env:SETUP_OPTIONS:} build install - {envpython} setup.py test + {envpython} pytest lupa sitepackages=False