diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48d0a8c4..0d4fbdfd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,7 +114,7 @@ jobs: LDFLAGS: ${{ env.CFLAGS_LTO }} - name: Run tests - run: python setup.py test + run: python -m lupa.tests.__main__ 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..300b0e57 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,7 +37,7 @@ build_script: test: off test_script: - - python -u setup.py test + - python -u -m lupa.tests.__main__ artifacts: - path: dist/*.whl diff --git a/lupa/tests/__main__.py b/lupa/tests/__main__.py new file mode 100644 index 00000000..51d4245f --- /dev/null +++ b/lupa/tests/__main__.py @@ -0,0 +1,4 @@ +if __name__ == '__main__': + import unittest + from . import suite + unittest.TextTestRunner(verbosity=2).run(suite()) diff --git a/tox.ini b/tox.ini index 2bd84e89..5c6044fa 100644 --- a/tox.ini +++ b/tox.ini @@ -17,5 +17,5 @@ passenv= SETUP_OPTIONS commands= {envpython} setup.py --with-cython {env:SETUP_OPTIONS:} build install - {envpython} setup.py test + {envpython} -m lupa.tests.__main__ sitepackages=False