Skip to content

Commit 81cfab4

Browse files
authored
Merge pull request #2 from pyserial/regular_package
Convert to regular package
2 parents 45c1fb6 + 81f67df commit 81cfab4

File tree

5 files changed

+14
-15
lines changed

5 files changed

+14
-15
lines changed

serial/__init__.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def find_version(*file_paths):
4545
raise RuntimeError("Unable to find version string.")
4646

4747

48-
version = find_version('serial', 'aio', '__init__.py')
48+
version = find_version('serial_asyncio', '__init__.py')
4949

5050

5151
setup(
@@ -55,7 +55,7 @@ def find_version(*file_paths):
5555
author="Chris Liechti",
5656
author_email="cliechti@gmx.net",
5757
url="https://github.com/pyserial/pyserial",
58-
packages=['serial', 'serial.aio'],
58+
packages=['serial_asyncio'],
5959
install_requires=[
6060
'pyserial',
6161
],

test/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

test/test_asyncio.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,24 @@
66
# SPDX-License-Identifier: BSD-3-Clause
77
"""\
88
Test asyncio related functionality.
9+
10+
To run from the command line with a specific port with a loop-back,
11+
device connected, use:
12+
13+
$ cd pyserial-asyncio
14+
$ python -m test.test_asyncio /dev/cu.usbserial-A103LR1R
15+
916
"""
1017

1118
import os
1219
import unittest
13-
import serial
20+
import asyncio
21+
22+
import serial_asyncio
1423

1524
# on which port should the tests be performed:
1625
PORT = '/dev/ttyUSB0'
1726

18-
import asyncio
19-
import serial.aio
20-
2127
@unittest.skipIf(os.name != 'posix', "asyncio not supported on platform")
2228
class Test_asyncio(unittest.TestCase):
2329
"""Test asyncio related functionality"""
@@ -59,7 +65,7 @@ def resume_writing(self):
5965
actions.append('resume')
6066
print(self.transport.get_write_buffer_size())
6167

62-
coro = serial.aio.create_serial_connection(self.loop, Output, PORT, baudrate=115200)
68+
coro = serial_asyncio.create_serial_connection(self.loop, Output, PORT, baudrate=115200)
6369
self.loop.run_until_complete(coro)
6470
self.loop.run_forever()
6571
self.assertEqual(b''.join(received), TEXT)

0 commit comments

Comments
 (0)