Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,14 @@ jobs:
run: |
brew install gnu-sed libtool autoconf automake

- uses: pypa/cibuildwheel@v2.8.0
- uses: pypa/cibuildwheel@v2.9.0
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_BUILD: ${{ matrix.cibw_python }}
CIBW_ARCHS: ${{ matrix.cibw_arch }}
# This is needed for now because cffi has no cp310 wheels
CIBW_BEFORE_ALL_LINUX: "yum -y install libffi-devel"
CIBW_TEST_EXTRAS: "test"
CIBW_TEST_COMMAND: "python {project}/tests/__init__.py"
CIBW_TEST_COMMAND_WINDOWS: "python {project}\\tests\\__init__.py"
CIBW_TEST_COMMAND: "python -m unittest discover -v {project}/tests"
CIBW_TEST_COMMAND_WINDOWS: "python -m unittest discover -v {project}\\tests"
CIBW_TEST_SKIP: "*universal2:arm64"

- uses: actions/upload-artifact@v3
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ docs:


test:
PYTHONASYNCIODEBUG=1 $(PYTHON) -m unittest -v tests.suite
$(PYTHON) -m unittest -v tests.suite
PYTHONASYNCIODEBUG=1 $(PYTHON) -m unittest discover -v tests
$(PYTHON) -m unittest discover -v tests


testinstalled:
cd "$${HOME}" && $(PYTHON) $(ROOT)/tests/__init__.py
cd "$${HOME}" && $(PYTHON) -m unittest discover -v $(ROOT)/tests
17 changes: 0 additions & 17 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +0,0 @@
import os.path
import sys
import unittest
import unittest.runner


def suite():
test_loader = unittest.TestLoader()
test_suite = test_loader.discover(
os.path.dirname(__file__), pattern='test_*.py')
return test_suite


if __name__ == '__main__':
runner = unittest.runner.TextTestRunner()
result = runner.run(suite())
sys.exit(not result.wasSuccessful())
16 changes: 16 additions & 0 deletions tests/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import os.path
import sys
import unittest
import unittest.runner


def suite():
test_loader = unittest.TestLoader()
test_suite = test_loader.discover(os.path.dirname(__file__))
return test_suite


if __name__ == '__main__':
runner = unittest.runner.TextTestRunner()
result = runner.run(suite())
sys.exit(not result.wasSuccessful())
2 changes: 1 addition & 1 deletion tests/test_libuv_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_libuv_get_loop_t_ptr(self):

pyximport.install()

from tests import cython_helper
import cython_helper

self.assertTrue(cython_helper.capsule_equals(cap1, cap2))
self.assertFalse(cython_helper.capsule_equals(cap1, cap3))
Expand Down