summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--serial/serialutil.py2
-rw-r--r--test/test_iolib.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/serial/serialutil.py b/serial/serialutil.py
index 1ccfabb..5fb5588 100644
--- a/serial/serialutil.py
+++ b/serial/serialutil.py
@@ -564,7 +564,7 @@ class SerialBase(io.RawIOBase):
self.apply_settings(d)
def isOpen(self):
- return self._is_open
+ return self.is_open
# - - - - - - - - - - - - - - - - - - - - - - - -
# additional functionality
diff --git a/test/test_iolib.py b/test/test_iolib.py
index 37ee081..f5635f3 100644
--- a/test/test_iolib.py
+++ b/test/test_iolib.py
@@ -63,10 +63,10 @@ class Test_SerialAndIO(unittest.TestCase):
self.s.close()
def test_hello_raw(self):
- self.io.write(r"hello\n")
+ self.io.write(b"hello\n".decode('utf-8'))
self.io.flush() # it is buffering. required to get the data out
hello = self.io.readline()
- self.failUnlessEqual(hello, u"hello\n")
+ self.failUnlessEqual(hello, b"hello\n".decode('utf-8'))
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if __name__ == '__main__':