diff --git a/test/test_compilation/test_compilation.py b/test/test_compilation/test_compilation.py index 3aad14eb..c4749257 100644 --- a/test/test_compilation/test_compilation.py +++ b/test/test_compilation/test_compilation.py @@ -6,11 +6,13 @@ import glob import os import subprocess import unittest +import logging from patacrep.encoding import open_read from .. import dynamic # pylint: disable=unused-import +LOGGER = logging.getLogger(__name__) class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): """Test of songbook compilation. @@ -96,24 +98,14 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): if steps: command.extend(['--steps', steps]) - return subprocess.check_call( - command, - stdin=subprocess.DEVNULL, - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, - cwd=os.path.dirname(songbook), - ) - #temp fix for travis tests try: - val = subprocess.check_output( + subprocess.check_output( command, stderr=subprocess.STDOUT, universal_newlines=True, cwd=os.path.dirname(songbook), ) - print("###ok") - print(val) - print("ok###") + return 0 except subprocess.CalledProcessError as e: - print(e.output) - return 1 \ No newline at end of file + LOGGER.warning(e.output) + return e.returncode \ No newline at end of file