summaryrefslogtreecommitdiff
path: root/test/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.py')
-rw-r--r--test/test.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test.py b/test/test.py
index a97eac5..8b38c8c 100644
--- a/test/test.py
+++ b/test/test.py
@@ -197,20 +197,22 @@ class Test_MoreTimeouts(unittest.TestCase):
self.s = serial.serial_for_url(PORT, do_not_open=True)
def tearDown(self):
+ self.s.reset_output_buffer()
+ self.s.flush()
#~ self.s.write(serial.XON)
self.s.close()
# reopen... some faulty USB-serial adapter make next test fail otherwise...
self.s.timeout = 1
self.s.xonxoff = False
self.s.open()
- self.s.read(10)
+ self.s.read(3000)
self.s.close()
def test_WriteTimeout(self):
"""Test write() timeout."""
# use xonxoff setting and the loop-back adapter to switch traffic on hold
self.s.port = PORT
- self.s.writeTimeout = True
+ self.s.write_timeout = 1.0
self.s.xonxoff = True
self.s.open()
self.s.write(serial.XOFF)