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

[Bug]: triage_tests.py is brittle against failures in test modules that have only check_figures_equal test #29774

Open
@anntzer

Description

@anntzer

Bug summary

If a check_figures_equal test fails in test_pickle.py (which has no baseline image tests at all), then running triage_tests.py fails with "ValueError: Can't find baseline dir for test_pickle".

Code for reproduction

Maketest_pickle::test_completefail,e.g.bycommentingoutthe`fig_test.figimage(loaded.canvas.renderer.buffer_rgba())`line;runthattest (whichshouldfail),andruntools/triage_tests.py.

Actual outcome

ValueError: Can't find baseline dir for test_pickle

Expected outcome

The test triager succeeds.

Additional information

Fixing involves either creating an empty test_pickle directory in the baseline_images directory, or allowing missing directories in triage_tests (which already interprets missingbaselines as arising from check_figures_equal tests):

diff --git i/tools/triage_tests.py w/tools/triage_tests.pyindex 5153b1c712..6df720f29d 100644--- i/tools/triage_tests.py+++ w/tools/triage_tests.py@@ -263,7 +263,7 @@ class Entry:             ]         self.thumbnails = [self.dir / x for x in self.thumbnails]-        if not Path(self.destdir, self.generated).exists():+        if self.destdir is None or not Path(self.destdir, self.generated).exists():             # This case arises from a check_figures_equal test.             self.status = 'autogen'         elif ((self.dir / self.generated).read_bytes()@@ -281,7 +281,6 @@ class Entry:             path = self.source / baseline_dir / reldir             if path.is_dir():                 return path-        raise ValueError(f"Can't find baseline dir for {reldir}")     @property     def display(self):

Opening as an issue because I don't really mind about which solution to pick, so I'll let whoever cares pick one.

Operating system

No response

Matplotlib Version

3.11.0.dev525+g9f7b3dd205

Matplotlib Backend

No response

Python version

3.13

Jupyter version

No response

Installation

git checkout

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