aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergio Martins <smartins@kde.org>2019-10-08 12:19:03 +0100
committerSergio Martins <smartins@kde.org>2019-10-08 23:39:48 +0100
commit54de206f2a331a4f0719d5c7396f88b2cd691367 (patch)
treeaa21def86c43fccf9ce103209bb9b8ddea4f931f
parent95359d148d2176df2b9a92106c17779e80ef3cce (diff)
tests: Fix exceptions about environment having non ascii
-rwxr-xr-xtests/run_tests.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 4977dbc0..f6b55f6c 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -94,8 +94,10 @@ class Test:
def setEnv(self, e):
self.env = os.environ.copy()
for key in e:
- key_str = key.encode('ascii', 'ignore')
- self.env[key_str] = e[key].encode('ascii', 'ignore')
+ if type(key) is bytes:
+ key = key.decode('utf-8')
+
+ self.env[key] = e[key]
def printableName(self, is_standalone, is_fixits):
name = self.check.name