Skip to content

Test suite hygiene: collision-checking skip markers, Python 3.10 workaround #575

Description

@petercorke

Migrated from tech-debt.md (deleted, see repo history via git log -- tech-debt.md). Small test-suite hygiene items.

  • Audit test_collision.py for missing @skip_no_collision_checking markers. tests/__init__.py provides skip_no_collision_checking so collision tests degrade gracefully when coal isn't installed (e.g. Windows, which has no coal wheel on PyPI). test_ELink.py, test_ERobot.py, test_Robot.py use it correctly; test_collision.py itself doesn't (or not consistently) -- produced 52 hard ImportError failures on Windows CI instead of skips once Windows jobs could reach the Test step at all. Fix: audit test_collision.py's test classes and apply the marker (or an equivalent module-level pytestmark) wherever a test exercises real collision geometry rather than the collision=False guard paths.

  • Remove the Python-3.10-specific sys.modules workaround in test_fknm_fallback.py, once requires-python drops 3.10. tests/test_fknm_fallback.py has a _ETS_module = sys.modules["roboticstoolbox.robot.ETS"] workaround: robot/__init__.py's from ...ETS import ETS shadows the ETS submodule with the ETS class, and Python 3.10's unittest.mock.patch() resolves dotted-string targets via plain getattr (fooled by the shadowing) where 3.11+'s pkgutil.resolve_name-based resolution isn't. Not a real code bug, purely a 3.10 unittest.mock limitation. Python 3.10 reaches EOL October 2026. When requires-python drops 3.10 support, simplify back to plain patch("roboticstoolbox.robot.ETS.ETS_fkine", ...)-style dotted strings, and do a quick sweep for any other sys.version_info/3.10-specific conditionals at the same time so the cleanup happens in one pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtKnown technical debt / deferred cleanup, not a live bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions