From 302cb93b4e097ae63d9fb7135de07f1d7ac71942 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Thu, 11 Feb 2016 19:00:28 +0100 Subject: [PATCH] Reduce cache test logging --- test/test_patatools/test_cache.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/test_patatools/test_cache.py b/test/test_patatools/test_cache.py index 447e0e73..13d7407a 100644 --- a/test/test_patatools/test_cache.py +++ b/test/test_patatools/test_cache.py @@ -11,6 +11,8 @@ from patacrep.tools.__main__ import main as tools_main from patacrep.tools.cache.__main__ import main as cache_main from patacrep.songbook.__main__ import main as songbook_main +from .. import logging_reduced + CACHEDIR = os.path.join(os.path.dirname(__file__), "test_cache_datadir", ".cache") class TestCache(unittest.TestCase): @@ -46,11 +48,16 @@ class TestCache(unittest.TestCase): ]: with self.subTest(main=main, args=args): # First compilation. Ensure that cache exists afterwards - self._system(songbook_main, ["songbook", "--steps", "tex,clean", "test_cache.yaml"]) + with logging_reduced('patacrep.build'): + self._system( + songbook_main, + ["songbook", "--steps", "tex,clean", "test_cache.yaml"] + ) self.assertTrue(os.path.exists(CACHEDIR)) # Clean cache - self._system(main, args) + with logging_reduced('patatools.cache'): + self._system(main, args) # Ensure that cache does not exist self.assertFalse(os.path.exists(CACHEDIR)) @@ -64,4 +71,5 @@ class TestCache(unittest.TestCase): ]: with self.subTest(main=main, args=args): # Clean cache - self._system(main, args) + with logging_reduced('patatools.cache'): + self._system(main, args)