summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2018-03-08 20:51:37 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2018-03-08 20:51:37 +0100
commitb409472c271c0f803cfa8ecc83033e508f2ae429 (patch)
tree5f0325b14d059f76d566dfe2e2ec814dc5b42e21
parentbb92699432c6479d314b8c6a4d0d65be9de75d29 (diff)
downloadpsutil-b409472c271c0f803cfa8ecc83033e508f2ae429.tar.gz
test environ: clean returned dict
-rwxr-xr-xpsutil/tests/test_process.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py
index a629cae5..33557b05 100755
--- a/psutil/tests/test_process.py
+++ b/psutil/tests/test_process.py
@@ -1410,7 +1410,9 @@ class TestProcess(unittest.TestCase):
d.pop("VERSIONER_PYTHON_PREFER_32_BIT", None)
d.pop("VERSIONER_PYTHON_VERSION", None)
return dict(
- [(k.rstrip("\r\n"), v.rstrip("\r\n")) for k, v in d.items()])
+ [(k.replace("\r", "").replace("\n", ""),
+ v.replace("\r", "").replace("\n", ""))
+ for k, v in d.items()])
self.maxDiff = None
p = psutil.Process()