From a91339ba4e5a638e1f44ddfc8d844e6e06dfca8b Mon Sep 17 00:00:00 2001 From: pciturri Date: Fri, 23 Aug 2024 15:53:23 +0200 Subject: [PATCH] refactor: Added type hints and docstrings to helper functions. Removed unused helper functions --- tests/test_plots.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/test_plots.py b/tests/test_plots.py index 5ab44f1b..f13a5d28 100644 --- a/tests/test_plots.py +++ b/tests/test_plots.py @@ -76,18 +76,18 @@ def is_github_ci(): show_plots = False -# class TestPlots(unittest.TestCase): -# -# def __init__(self, *args, **kwargs): -# super().__init__(*args, **kwargs) # Call the parent constructor -# # Define the save directory -# self.artifacts = os.path.join(os.path.dirname(__file__), "artifacts") -# self.save_dir = os.path.join(self.artifacts, "plots") -# os.makedirs(self.save_dir, exist_ok=True) -# -# def savefig(self, ax, name): -# ax.figure.savefig(os.path.join(self.save_dir, name)) -# +class TestPlots(unittest.TestCase): + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) # Call the parent constructor + # Define the save directory + self.artifacts = os.path.join(os.path.dirname(__file__), "artifacts") + self.save_dir = os.path.join(self.artifacts, "plots") + os.makedirs(self.save_dir, exist_ok=True) + + def savefig(self, ax, name): + ax.figure.savefig(os.path.join(self.save_dir, name)) + # # class TestTimeSeriesPlots(TestPlots): #