diff options
author | Chris Liechti <cliechti@gmx.net> | 2016-05-26 17:17:54 +0200 |
---|---|---|
committer | Chris Liechti <cliechti@gmx.net> | 2016-05-26 17:17:54 +0200 |
commit | 5524bc075fffd7b79b8747613a913dcea5a80a68 (patch) | |
tree | 0d7833a54099c8aebaea705f0d4eb323b189af31 /test | |
parent | 77d922b37478443135c495e37c9c784711d54a87 (diff) | |
download | pyserial-git-5524bc075fffd7b79b8747613a913dcea5a80a68.tar.gz |
test: cleanup & tweak test
Diffstat (limited to 'test')
-rw-r--r-- | test/test_iolib.py | 14 | ||||
-rw-r--r-- | test/test_settings_dict.py | 4 |
2 files changed, 4 insertions, 14 deletions
diff --git a/test/test_iolib.py b/test/test_iolib.py index 716eb0d..71c7db6 100644 --- a/test/test_iolib.py +++ b/test/test_iolib.py @@ -24,19 +24,9 @@ Shortcut these pin pairs: On a 9 pole DSUB these are the pins (2-3) (4-6) (7-8) """ -import unittest -import sys - -if __name__ == '__main__' and sys.version_info < (2, 6): - sys.stderr.write("""\ -============================================================================== -WARNING: this test is intended for Python 2.6 and newer where the io library -is available. This seems to be an older version of Python running. -Continuing anyway... -============================================================================== -""") - import io +import sys +import unittest import serial # trick to make that this test run under 2.6 and 3.x without modification. diff --git a/test/test_settings_dict.py b/test/test_settings_dict.py index ae90720..12fd4c3 100644 --- a/test/test_settings_dict.py +++ b/test/test_settings_dict.py @@ -61,12 +61,12 @@ class Test_SettingsDict(unittest.TestCase): ('parity', serial.PARITY_ODD), ('xonxoff', True), ('rtscts', True), - ('dsrdtr', True), - ): + ('dsrdtr', True)): kwargs = {'do_not_open': True, setting: value} ser = serial.serial_for_url(PORT, **kwargs) d = ser.get_settings() self.assertEqual(getattr(ser, setting), value) + self.assertEqual(d[setting], value) if __name__ == '__main__': |