Repository navigation
SWR matplotlib__matplotlib-2720 - #22
richeshgupta wants to merge 1 commit into
Conversation
| # Users may want multiple library paths, so store a list of paths. | ||
| USER_LIBRARY_PATHS = [os.path.join('~', '.matplotlib', 'stylelib')] | ||
| USER_LIBRARY_PATHS = [os.path.join('~', '.matplotlib', 'stylelib'), | ||
| os.path.join('~', '.config', 'matplotlib', 'stylelib')] |
There was a problem hiding this comment.
[MEDIUM] No test loads a style from the newly added ~/.config/matplotlib/stylelib library path
Issue
The added entry makes style discovery scan ~/.config/matplotlib/stylelib as well as ~/.matplotlib/stylelib, but no test places a style there and asserts it is discovered and applied. The PR's entire behaviour change, including precedence when the same style name exists in both user directories, can silently regress.
Evidence
SUSPECTED: in lib/matplotlib/style/tests/test_style.py, write customteststyle.mplstyle into os.path.expanduser(USER_LIBRARY_PATHS[1]), call matplotlib.style.reload_library(), and assert it appears in style.available and that style.use() applies it — this settles the claim and permanently pins the new path.
SWRBench case matplotlib__matplotlib-2720: pinned base 2b9fced to head ac9bf14 of matplotlib#2720. Benchmark replay, not for merge.