summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2018-09-28 19:13:02 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2018-09-28 19:13:02 +0200
commitda17f5e3d0b5fc7d3812fc1556426430a8464624 (patch)
treeb52d1a3e8d5b2606e4dcb0a34a2e284c917c1b9c
parentcc888778bf49c6472b22ed7b5541e0c6e294c427 (diff)
downloadpsutil-da17f5e3d0b5fc7d3812fc1556426430a8464624.tar.gz
Fix decoding error in tests
https://travis-ci.org/giampaolo/psutil/jobs/434570177
-rwxr-xr-xpsutil/tests/test_process.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py
index 80f9796f..a4adf367 100755
--- a/psutil/tests/test_process.py
+++ b/psutil/tests/test_process.py
@@ -31,6 +31,7 @@ from psutil import OPENBSD
from psutil import POSIX
from psutil import SUNOS
from psutil import WINDOWS
+from psutil._common import open_text
from psutil._compat import long
from psutil._compat import PY3
from psutil.tests import APPVEYOR
@@ -626,7 +627,7 @@ class TestProcess(unittest.TestCase):
raise
else:
# https://github.com/giampaolo/psutil/issues/759
- with open('/proc/self/smaps') as f:
+ with open_text('/proc/self/smaps') as f:
data = f.read()
if "%s (deleted)" % nt.path not in data:
raise