Skip to content

Commit

Permalink
Remove Cython-based tests (#1793)
Browse files Browse the repository at this point in the history
The Cython tests have long outlived their usefulness, and represent a
maintainability risk. This PR removes them.

Closes #845.
  • Loading branch information
mdickinson authored May 7, 2024
1 parent 2ee98ff commit 9cfaf74
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 225 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test-from-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ jobs:
allow-prereleases: true
- name: Install test dependencies and Traits from PyPI sdist (no PySide6)
run: |
python -m pip install --no-binary traits Cython numpy setuptools Sphinx traits traitsui
python -m pip install --no-binary traits numpy setuptools Sphinx traits traitsui
if: matrix.python-version == '3.12' || matrix.python-architecture == 'x86'
- name: Install test dependencies and Traits from PyPI sdist (PySide6)
run: |
python -m pip install --no-binary traits Cython numpy PySide6 setuptools Sphinx traits traitsui
python -m pip install --no-binary traits numpy PySide6 setuptools Sphinx traits traitsui
if: matrix.python-version != '3.12' && matrix.python-architecture != 'x86'
- name: Create clean test directory
run: |
Expand Down Expand Up @@ -100,11 +100,11 @@ jobs:
allow-prereleases: true
- name: Install test dependencies and Traits from PyPI wheel (no PySide6)
run: |
python -m pip install --only-binary traits Cython numpy setuptools Sphinx traits traitsui
python -m pip install --only-binary traits numpy setuptools Sphinx traits traitsui
if: matrix.python-version == '3.12' || matrix.python-architecture == 'x86'
- name: Install test dependencies and Traits from PyPI wheel (PySide6)
run: |
python -m pip install --only-binary traits Cython numpy PySide6 setuptools Sphinx traits traitsui
python -m pip install --only-binary traits numpy PySide6 setuptools Sphinx traits traitsui
if: matrix.python-version != '3.12' && matrix.python-architecture != 'x86'
- name: Create clean test directory
run: |
Expand Down
1 change: 0 additions & 1 deletion etstool.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
common_dependencies = {
"configobj",
"coverage",
"cython",
"enthought_sphinx_theme",
"flake8",
"flake8_ets",
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ def get_long_description():
"sphinx-copybutton",
],
"test": [
"Cython",
# defusedxml is required by the Sphinx test machinery
# for recent versions of Sphinx (including 7.3.7)
"defusedxml",
Expand Down
2 changes: 1 addition & 1 deletion traits/has_traits.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def is_unbound_method_type(method):
and _name_fired methods.
"""
# The ismethoddescriptor check catches methods written in C or Cython
# The ismethoddescriptor check catches methods written in C
# extensions. It excludes things that pass an isfunction check, so we have
# to explicitly re-include that check.
return inspect.isfunction(method) or inspect.ismethoddescriptor(method)
Expand Down
3 changes: 0 additions & 3 deletions traits/testing/optional_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ def optional_import(name):


# Commonly-used unittest skip decorators.
cython = optional_import("cython")
requires_cython = unittest.skipIf(cython is None, "Cython not available")

mypy = optional_import("mypy")
requires_mypy = unittest.skipIf(mypy is None, "Mypy not available")

Expand Down
215 changes: 0 additions & 215 deletions traits/tests/test_cythonized_traits.py

This file was deleted.

0 comments on commit 9cfaf74

Please sign in to comment.