diff options
author | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2009-08-05 12:40:38 +0000 |
---|---|---|
committer | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2009-08-05 12:40:38 +0000 |
commit | 45509e198837b639fb9e1d3bf29060d7784098d2 (patch) | |
tree | 463045d85dbb41fa97f5a3ee77013dc38d828eda /examples | |
parent | 3de643ddac29f10b22a24dd57021185b696f9286 (diff) | |
download | pyserial-45509e198837b639fb9e1d3bf29060d7784098d2.tar.gz |
rename function -> serial_for_url
git-svn-id: http://svn.code.sf.net/p/pyserial/code/trunk/pyserial@295 f19166aa-fa4f-0410-85c2-fa1106f25c8a
Diffstat (limited to 'examples')
-rw-r--r-- | examples/miniterm.py | 2 | ||||
-rw-r--r-- | examples/test.py | 10 | ||||
-rw-r--r-- | examples/test_advanced.py | 4 | ||||
-rw-r--r-- | examples/test_high_load.py | 2 | ||||
-rw-r--r-- | examples/test_iolib.py | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/examples/miniterm.py b/examples/miniterm.py index 895830c..4a5065f 100644 --- a/examples/miniterm.py +++ b/examples/miniterm.py @@ -133,7 +133,7 @@ REPR_MODES = ('raw', 'some control', 'all control', 'hex') class Miniterm: def __init__(self, port, baudrate, parity, rtscts, xonxoff, echo=False, convert_outgoing=CONVERT_CRLF, repr_mode=0): - self.serial = serial.serial_class_for_url(port, baudrate, parity=parity, rtscts=rtscts, xonxoff=xonxoff, timeout=1) + self.serial = serial.serial_for_url(port, baudrate, parity=parity, rtscts=rtscts, xonxoff=xonxoff, timeout=1) self.echo = echo self.repr_mode = repr_mode self.convert_outgoing = convert_outgoing diff --git a/examples/test.py b/examples/test.py index 9b49df1..1b174de 100644 --- a/examples/test.py +++ b/examples/test.py @@ -45,7 +45,7 @@ class Test4_Nonblocking(unittest.TestCase): timeout = 0 def setUp(self): - self.s = serial.serial_class_for_url(PORT, timeout=self.timeout) + self.s = serial.serial_for_url(PORT, timeout=self.timeout) def tearDown(self): self.s.close() @@ -118,7 +118,7 @@ class Test1_Forever(unittest.TestCase): character is sent after some time to stop the test, this is done through the SendEvent class and the Loopback HW.""" def setUp(self): - self.s = serial.serial_class_for_url(PORT, timeout=None) + self.s = serial.serial_for_url(PORT, timeout=None) self.event = SendEvent(self.s) def tearDown(self): @@ -136,7 +136,7 @@ class Test1_Forever(unittest.TestCase): class Test2_Forever(unittest.TestCase): """Tests a port with no timeout""" def setUp(self): - self.s = serial.serial_class_for_url(PORT, timeout=None) + self.s = serial.serial_for_url(PORT, timeout=None) def tearDown(self): self.s.close() @@ -160,7 +160,7 @@ class Test2_Forever(unittest.TestCase): class Test0_DataWires(unittest.TestCase): """Test modem control lines""" def setUp(self): - self.s = serial.serial_class_for_url(PORT) + self.s = serial.serial_for_url(PORT) def tearDown(self): self.s.close() @@ -192,7 +192,7 @@ class Test_MoreTimeouts(unittest.TestCase): """Test with timeouts""" def setUp(self): # create an closed serial port - self.s = serial.serial_class_for_url(PORT, do_not_open=True) + self.s = serial.serial_for_url(PORT, do_not_open=True) def tearDown(self): self.s.close() diff --git a/examples/test_advanced.py b/examples/test_advanced.py index 52bcbee..a1a475b 100644 --- a/examples/test_advanced.py +++ b/examples/test_advanced.py @@ -33,7 +33,7 @@ class Test_ChangeAttributes(unittest.TestCase): def setUp(self): # create a closed serial port - self.s = serial.serial_class_for_url(PORT, do_not_open=True) + self.s = serial.serial_for_url(PORT, do_not_open=True) def tearDown(self): self.s.close() @@ -149,7 +149,7 @@ class Test_ChangeAttributes(unittest.TestCase): # no illegal values here, normal rules for the boolean value of an # object are used thus all objects have a truth value. - # this test does not work anymore since serial_class_for_url that is used + # this test does not work anymore since serial_for_url that is used # now, already sets a port def disabled_test_UnconfiguredPort(self): # an unconfigured port cannot be opened diff --git a/examples/test_high_load.py b/examples/test_high_load.py index 8306df1..4e2e35b 100644 --- a/examples/test_high_load.py +++ b/examples/test_high_load.py @@ -44,7 +44,7 @@ class TestHighLoad(unittest.TestCase): #~ N = 1 def setUp(self): - self.s = serial.serial_class_for_url(PORT, BAUDRATE, timeout=10) + self.s = serial.serial_for_url(PORT, BAUDRATE, timeout=10) def tearDown(self): self.s.close() diff --git a/examples/test_iolib.py b/examples/test_iolib.py index 8c03a86..5bcaed3 100644 --- a/examples/test_iolib.py +++ b/examples/test_iolib.py @@ -55,7 +55,7 @@ PORT = 0 class Test_SerialAndIO(unittest.TestCase): def setUp(self): - self.s = serial.serial_class_for_url(PORT, timeout=1) + self.s = serial.serial_for_url(PORT, timeout=1) self.io = io.TextIOWrapper(io.BufferedRWPair(self.s, self.s)) def tearDown(self): |