From da9767c3d86597962a2fa2effa43927dc47ec1d9 Mon Sep 17 00:00:00 2001 From: Marvin Kastner Date: Tue, 21 May 2024 21:08:22 +0200 Subject: [PATCH] Undo changes --- conflowgen/tests/analyses/test_run_all_analyses.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/conflowgen/tests/analyses/test_run_all_analyses.py b/conflowgen/tests/analyses/test_run_all_analyses.py index 4bf39f5..0ce2c03 100644 --- a/conflowgen/tests/analyses/test_run_all_analyses.py +++ b/conflowgen/tests/analyses/test_run_all_analyses.py @@ -1,5 +1,5 @@ import datetime -from unittest import mock +import unittest.mock from conflowgen.analyses import run_all_analyses from conflowgen.application.models.container_flow_generation_properties import ContainerFlowGenerationProperties @@ -24,11 +24,9 @@ def test_with_no_data(self): run_all_analyses() self.assertEqual(len(context.output), 35) - @mock.patch('matplotlib.pyplot.show') - #@mock.patch('conflowgen.reporting.auto_reporter.AutoReporter.present_reports') def test_with_no_data_as_graph(self, mock_pyplot): - # with unittest.mock.patch("matplotlib.pyplot.show"): - with self.assertLogs('conflowgen', level='INFO') as context: - print("Before run_all_analyses") - run_all_analyses(as_text=False, as_graph=True, static_graphs=True) - self.assertEqual(len(context.output), 27) + with unittest.mock.patch("matplotlib.pyplot.show"): + with self.assertLogs('conflowgen', level='INFO') as context: + print("Before run_all_analyses") + run_all_analyses(as_text=False, as_graph=True, static_graphs=True) + self.assertEqual(len(context.output), 27)