Skip to content

Commit bdad428

Browse files
committed
TST: put the missing path in the error message
1 parent e81b503 commit bdad428

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/matplotlib/tests/__init__.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33

44

55
if (base_path := os.environ.get("MPLTESTIMAGEPATH", None)) is None:
6-
base_path = Path(__file__).parent
6+
base_path = Path(__file__).parent / 'baseline_images'
77
else:
8-
base_path = Path(base_path) / 'matplotlib' / 'tests'
8+
base_path = Path(base_path) / 'matplotlib' / 'tests' / 'baseline_images'
9+
910

1011
# Check that the test directories exist.
11-
if not (base_path / 'baseline_images').exists():
12+
if not (base_path).exists():
1213
raise OSError(
13-
'The baseline image directory does not exist. '
14+
f'The baseline image directory ({base_path!r}) does not exist. '
1415
'This is most likely because the test data is not installed. '
1516
'You may need to install matplotlib from source to get the '
1617
'test data.')
18+
19+
del base_path

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy