GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — MNT: Compat with pytest 8.1 by pllim · Pull Request #219 · matplotlib/pytest-mpl

MNT: Compat with pytest 8.1 #219

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.

Sign up for GitHub

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

Merged
ConorMacBride merged 5 commits into matplotlib:main from pllim:patch-1
Jan 10, 2024

Uh oh!

There was an error while loading. Please reload this page.

Merged

MNT: Compat with pytest 8.1 #219

Changes from 1 commit
Commits
Show all changes
5 commits
Select commit Hold shift + click to select a range
8d330ec
MNT: Compat with pytest 8.1
pllim Jan 6, 2024
267114a
Fix version comparison
pllim Jan 6, 2024
2cdaba0
Reverts bd7b5c61863170c809c182c9a3bcd81697b52f1a
pllim Jan 9, 2024
e57d11e
Remove args from pytest_report_header
pllim Jan 9, 2024
32da10a
Auto-cancel duplicate CI
pllim Jan 9, 2024
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Next Next commit
MNT: Compat with pytest 8.1
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@pllim
pllim committed Jan 9, 2024
commit 8d330ecf44cc82a24dd6bd5313ff0941f95b7f43

There are no files selected for viewing

21 changes: 16 additions & 5 deletions 21 pytest_mpl/plugin.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
{actual_path}"""

PYTEST_LT_7 = Version(pytest.__version__) < Version("7.0.0")
PYTEST_GE_8_0 = any([_pytest_version.is_devrelease,
_pytest_version.is_prerelease,
_pytest_version >= Version('8.0')])

# The following are the subsets of formats supported by the Matplotlib image
# comparison machinery
Expand Down Expand Up @@ -128,11 +131,19 @@ def wrapper(*args, **kwargs):
item.obj = figure_interceptor(plugin, item.obj)


def pytest_report_header(config, startdir):
Comment thread
pllim marked this conversation as resolved.
Resolved

Uh oh!

There was an error while loading. Please reload this page.

import matplotlib
import matplotlib.ft2font
return ["Matplotlib: {0}".format(matplotlib.__version__),
"Freetype: {0}".format(matplotlib.ft2font.__freetype_version__)]
if PYTEST_GE_8_0:
def pytest_report_header(config, start_path):
import matplotlib
import matplotlib.ft2font
return ["Matplotlib: {0}".format(matplotlib.__version__),
"Freetype: {0}".format(matplotlib.ft2font.__freetype_version__)]

else:
def pytest_report_header(config, startdir):
import matplotlib
import matplotlib.ft2font
return ["Matplotlib: {0}".format(matplotlib.__version__),
"Freetype: {0}".format(matplotlib.ft2font.__freetype_version__)]


def pytest_addoption(parser):
Expand Down
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.