diff options
| author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-04-25 14:39:09 +0200 |
|---|---|---|
| committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-04-25 14:39:09 +0200 |
| commit | 9b29a184bfcf5a8434b544a139440efe2003da1b (patch) | |
| tree | a8d2079dc2ef430179a7602f9e8de47013838af6 /psutil/tests/test_linux.py | |
| parent | 477f47720fc87330e4041525ca4aa34140641444 (diff) | |
| download | psutil-9b29a184bfcf5a8434b544a139440efe2003da1b.tar.gz | |
fix py3 failures
Diffstat (limited to 'psutil/tests/test_linux.py')
| -rwxr-xr-x | psutil/tests/test_linux.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py index 98d30bba..162d7a29 100755 --- a/psutil/tests/test_linux.py +++ b/psutil/tests/test_linux.py @@ -1146,7 +1146,7 @@ class TestMisc(unittest.TestCase): # psutil is supposed to fall back on using pids(). def open_mock(name, *args, **kwargs): if name == "/proc/%s/status" % os.getpid(): - return io.BytesIO("") + return io.StringIO(u("")) else: return orig_open(name, *args, **kwargs) @@ -1208,7 +1208,7 @@ class TestSensorsBattery(unittest.TestCase): if name.endswith("AC0/online") or name.endswith("AC/online"): raise IOError(errno.ENOENT, "") elif name.endswith("/status"): - return io.BytesIO(b"charging") + return io.StringIO(u("charging")) else: return orig_open(name, *args, **kwargs) @@ -1239,7 +1239,7 @@ class TestSensorsBattery(unittest.TestCase): if name.endswith("AC0/online") or name.endswith("AC/online"): raise IOError(errno.ENOENT, "") elif name.endswith("/status"): - return io.BytesIO(b"discharging") + return io.StringIO(u("discharging")) else: return orig_open(name, *args, **kwargs) |
