8000 DRAFT: enabling doctestplus by bsipocz · Pull Request #23812 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

DRAFT: enabling doctestplus #23812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
MAINT: making pytest with doctestplus collect without errors
  • Loading branch information
bsipocz committed Dec 20, 2023
commit a2695f5bc47de86a20308aa0dfd89255a10915f6
4 changes: 2 additions & 2 deletions numpy/_core/cversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"""
from os.path import dirname

from code_generators.genapi import fullapi_hash
from code_generators.numpy_api import full_api
from .code_generators.genapi import fullapi_hash
from .code_generators.numpy_api import full_api

if __name__ == '__main__':
curdir = dirname(__file__)
Expand Down
3 changes: 2 additions & 1 deletion numpy/random/_examples/cffi/extending.py
BAA2
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import os
import numpy as np
import cffi
from .parse import parse_distributions_h
from numpy.random._examples.cffi.parse import parse_distributions_h

ffi = cffi.FFI()

inc_dir = os.path.join(np.get_include(), 'numpy')
Expand Down
18 changes: 17 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
[pytest]
doctest_plus = enabled
addopts = -l
norecursedirs = doc tools numpy/linalg/lapack_lite numpy/_core/code_generators
norecursedirs =
# TODO: narrative doc should be tested
doc
tools
numpy/linalg/lapack_lite
numpy/_core/code_generators
numpy/distutils
# numba requires <1.25 np
numpy/random/_examples/numba
# ignore for now for doctesting (TODO: do this properly)
numpy/f2py

doctest_optionflags = NORMALIZE_WHITESPACE ELLIPSIS ALLOW_UNICODE ALLOW_BYTES
junit_family=xunit2

Expand All @@ -27,3 +39,7 @@ filterwarnings =
ignore:\n\n `numpy.distutils`:DeprecationWarning
# Ignore mypy >= 0.971 DeprecationWarnings
ignore:path is deprecated\. Use files\(\) instead:DeprecationWarning:mypy
# Ignore deprecation triggered by Cython
ignore:'cgi' is deprecated and slated for removal in Python 3.13:DeprecationWarning:Cython
# Ignore deprecation from PyInstaller
ignore:the imp module is deprecated in favour of importlib:DeprecationWarning:PyInstaller
0