Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

tests fail when PYTHONOPTIMIZE is set #10312

Open
@anntzer

Description

@anntzer

Bug report

Bug summary

There used to be one CI run with python -OO (== PYTHONOPTIMIZE=2), but it was accidentally removed in#10217 (it was set via PYTHON_ARGS).

Now there is at least one test are failing in this setup, namely

$ PYTHONOPTIMIZE=2 pytest lib/matplotlib/tests/test_legend.py -k kwdocstring<elided>lib/matplotlib/tests/test_legend.py F                                                    [100%]___________________________________ test_legend_kwdocstrings ___________________________________    def test_legend_kwdocstrings():>       stax = get_docstring_section(mpl.axes.Axes.legend, 'Parameters')lib/matplotlib/tests/test_legend.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ func = <function Axes.legend at 0x7fc35f690158>, section = 'Parameters'    def get_docstring_section(func, section):        """ extract a section from the docstring of a function """        ll = inspect.getdoc(func)>       lines = ll.splitlines()E       AttributeError: 'NoneType' object has no attribute 'splitlines'lib/matplotlib/tests/test_legend.py:27: AttributeError===================================== 57 tests deselected ================================================================= 1 failed, 57 deselected in 0.35 seconds ============================

Code for reproduction

# Paste your code here##

Actual outcome

# If applicable, paste the console output here##

Expected outcome

Matplotlib version

  • Operating system:
  • Matplotlib version:
  • Matplotlib backend (print(matplotlib.get_backend())):
  • Python version:
  • Jupyter version (if applicable):
  • Other libraries:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp