From 0039f7921a67c0a92dfc080a0140bd751c1ca07f Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Fri, 22 Nov 2024 11:17:14 +1100 Subject: [PATCH] * tests/test_sim.py (test_sim_with_logging): New method. --- tests/test_sim.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_sim.py b/tests/test_sim.py index 4a2a9ddd..7c8939a9 100644 --- a/tests/test_sim.py +++ b/tests/test_sim.py @@ -9,6 +9,7 @@ """A testsuite for the sim module.""" +import logging import unittest import numpy as np @@ -35,6 +36,14 @@ def test_sim(self): self.context.verbose = True sim._sim(self.context, self.date_range) + def test_sim_with_logging(self): + """Test _sim() function.""" + origlevel = logging.getLogger().level + logging.getLogger().setLevel(logging.INFO) + self.context.verbose = True + sim._sim(self.context, self.date_range) + logging.getLogger().setLevel(origlevel) + def test_dispatch(self): """Test _dispatch() function.""" self.context.verbose = True