From 825669e048309b3ed7f400524aced4063fd76be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Mon, 18 Dec 2023 10:46:58 +0100 Subject: [PATCH] TST: ignore __pycache__ in test generation --- cmasher/tests/test_utils.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cmasher/tests/test_utils.py b/cmasher/tests/test_utils.py index d9defcae..ea50f31f 100644 --- a/cmasher/tests/test_utils.py +++ b/cmasher/tests/test_utils.py @@ -57,11 +57,8 @@ def _MPL38_colormap_eq(cmap, other) -> bool: # Obtain list of all colormaps defined in CMasher # As all colormaps have their own directories, save them instead -cm_names = sorted(next(os.walk(cmap_dir))[1]) - -# Make sure that the 'PROJECTS' folder is removed -if "PROJECTS" in cm_names: - cm_names.remove("PROJECTS") +_IGNORED = ["PROJECTS", "__pycache__"] +cm_names = [_ for _ in sorted(next(os.walk(cmap_dir))[1]) if _ not in _IGNORED] # Obtain list of all colormaps registered in MPL mpl_cmaps = plt.colormaps()