summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Liechti <cliechti@gmx.net>2016-10-08 21:06:58 +0200
committerChris Liechti <cliechti@gmx.net>2016-10-08 21:06:58 +0200
commit73ff15c1c66ea73e1a2886a418da7c6c9c251274 (patch)
treeaec5fd069032fdebc3ec21125603d06f8aff39e2
parent888026456eb7efb947cd4405bd5e328a65b05265 (diff)
downloadpyserial-git-73ff15c1c66ea73e1a2886a418da7c6c9c251274.tar.gz
test: remove traces of port numbers
-rw-r--r--test/test_high_load.py2
-rw-r--r--test/test_iolib.py11
-rw-r--r--test/test_readline.py2
-rw-r--r--test/test_settings_dict.py2
-rw-r--r--test/test_util.py3
5 files changed, 4 insertions, 16 deletions
diff --git a/test/test_high_load.py b/test/test_high_load.py
index 78d66a9..b0bd773 100644
--- a/test/test_high_load.py
+++ b/test/test_high_load.py
@@ -25,7 +25,7 @@ import sys
import serial
# on which port should the tests be performed:
-PORT = 0
+PORT = 'loop://'
BAUDRATE = 115200
#~ BAUDRATE=9600
diff --git a/test/test_iolib.py b/test/test_iolib.py
index 3dfaf50..84e3fa2 100644
--- a/test/test_iolib.py
+++ b/test/test_iolib.py
@@ -29,17 +29,8 @@ import sys
import unittest
import serial
-# trick to make that this test run under 2.6 and 3.x without modification.
-# problem is, io library on 2.6 does NOT accept type 'str' and 3.x doesn't
-# like u'nicode' strings with the prefix and it is not providing an unicode
-# function ('str' is now what 'unicode' used to be)
-if sys.version_info >= (3, 0):
- def unicode(x):
- return x
-
-
# on which port should the tests be performed:
-PORT = 0
+PORT = 'loop://'
class Test_SerialAndIO(unittest.TestCase):
diff --git a/test/test_readline.py b/test/test_readline.py
index b23cedd..34b807b 100644
--- a/test/test_readline.py
+++ b/test/test_readline.py
@@ -28,7 +28,7 @@ import serial
#~ print serial.VERSION
# on which port should the tests be performed:
-PORT = 0
+PORT = 'loop://'
if sys.version_info >= (3, 0):
def data(string):
diff --git a/test/test_settings_dict.py b/test/test_settings_dict.py
index ac3c533..86ee4b2 100644
--- a/test/test_settings_dict.py
+++ b/test/test_settings_dict.py
@@ -15,7 +15,7 @@ import unittest
import serial
# on which port should the tests be performed:
-PORT = 0
+PORT = 'loop://'
SETTINGS = ('baudrate', 'bytesize', 'parity', 'stopbits', 'xonxoff',
diff --git a/test/test_util.py b/test/test_util.py
index 1eba962..5bf8e60 100644
--- a/test/test_util.py
+++ b/test/test_util.py
@@ -11,7 +11,6 @@ Tests for utility functions of serualutil.
import os
import unittest
import serial
-import time
class Test_util(unittest.TestCase):
@@ -32,8 +31,6 @@ class Test_util(unittest.TestCase):
if __name__ == '__main__':
import sys
sys.stdout.write(__doc__)
- if len(sys.argv) > 1:
- PORT = sys.argv[1]
sys.argv[1:] = ['-v']
# When this module is executed from the command-line, it runs all its tests
unittest.main()