From cff347ae775debd10612fbeb8c301c4d6005bcb3 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Wed, 26 Oct 2016 13:43:02 +0200 Subject: [PATCH] Fixed tests failing in gnome-terminal. --- BUGS | 2 +- termstr_test.py | 3 +++ tools_test.py | 2 ++ vigil_test.py | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/BUGS b/BUGS index 896f16b..5bd87c4 100644 --- a/BUGS +++ b/BUGS @@ -13,7 +13,6 @@ Current - When shutting down "Exception ignored in:" noise appears. Four messages for every worker running. This started with the move to asyncio for the workers. -- The tests fail when run in gnome-terminal. Current (tool related) @@ -234,6 +233,7 @@ Fixed <- Now vigil always gets sudo. - Some results are always missing their contents and are showing "?". e.g. golden-files/results/uncrustify-hello_c <- contents and metadata +- The tests fail when run in gnome-terminal. Won't fix diff --git a/termstr_test.py b/termstr_test.py index 8d2eaa4..ef3b4f5 100755 --- a/termstr_test.py +++ b/termstr_test.py @@ -3,9 +3,12 @@ # Copyright (C) 2015-2016 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. +import os import pickle import unittest +os.environ["TERM"] = "st-256color" + from termstr import TermStr, CharStyle import termstr diff --git a/tools_test.py b/tools_test.py index 1d07d89..80a5827 100755 --- a/tools_test.py +++ b/tools_test.py @@ -9,6 +9,8 @@ import subprocess import unittest import unittest.mock +os.environ["TERM"] = "st-256color" + import fill3 import golden import tools diff --git a/vigil_test.py b/vigil_test.py index b32406f..b0d6485 100755 --- a/vigil_test.py +++ b/vigil_test.py @@ -13,6 +13,8 @@ import unittest import psutil +os.environ["TERM"] = "st-256color" + import fill3 import golden import vigil