Skip to content

pytest: ignore cython files #33560

@tobiasdiez

Description

@tobiasdiez

As we probably don't want people to write pytests in Cython, we should skip collecting cython files to prevent issues like

$ ./sage -t src/sage/symbolic/expression.pyx
[...]

============================================================================================================ test session starts ============================================================================================================
platform darwin -- Python 3.10.2, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/mkoeppe/s/sage/sage-rebasing/worktree-gcc11/src, configfile: tox.ini
collected 0 items                                                                                                                                                                                                                           

=========================================================================================================== no tests ran in 0.01s ===========================================================================================================
ERROR: not found: /Users/mkoeppe/s/sage/sage-rebasing/worktree-gcc11/src/sage/symbolic/expression.pyx

Later, one could use https://github.com/lgpage/pytest-cython to extract doctests from cython files.

Depends on #33572

CC: @mkoeppe

Component: doctest framework

Author: Tobias Diez

Branch/Commit: 4c0ff54

Reviewer: Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/33560

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions