From 95782b0974e85fafe0edafb9e0a7043e32d7e8d5 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Tue, 10 Mar 2020 15:39:23 +0100 Subject: [PATCH] fix print_results tests when COLUMNS is not set --- tests/test_print.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_print.py b/tests/test_print.py index 583ebbe..7c3a005 100755 --- a/tests/test_print.py +++ b/tests/test_print.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +import os import unittest from unittest.mock import patch, call, MagicMock @@ -6,6 +7,10 @@ from pirate.print import Printer class TestPrint(unittest.TestCase): + @classmethod + def setUpClass(cls): + # needed to display the results table + os.environ['COLUMNS'] = '80' def test_print_results_remote(self): class MockTable: