Skip to content

Use pytest to run doctests #33546

@mkoeppe

Description

@mkoeppe

As suggested in #33232 comment:1, ./sage --pytest now uses pytest to discover and run doctests.

To test, run ./sage --pytest src/sage/manifolds/. This results in

48 failed, 1416 passed, 7 warnings

With many of the failed tests being due to some issues with assumptions and/or symbolic variables and/or deprecation warnings.
To see examples of these failures, run pytest on

src/sage/manifolds/differentiable/examples/sphere.py
src/sage/manifolds/utilities.py
src/sage/manifolds/chart.py

We also add tests that verify that sage --pytest (and sage -t) correctly complain about failing doctests.

Follow-ups:

Depends on #33572

CC: @tobiasdiez @tornaria

Component: doctest framework

Author: Tobias Diez

Branch: cc19e92

Reviewer: Matthias Koeppe

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions