# Path: bibliopixel/drivers/return_codes.py
# class RETURN_CODES:
#     SUCCESS = 255  # All is well
#     REBOOT = 42  # Device reboot needed after configuration
#     ERROR = 0  # Generic error
#     ERROR_SIZE = 1  # Data received does not match given command length
#     ERROR_UNSUPPORTED = 2  # Unsupported command
#     ERROR_PIXEL_COUNT = 3  # Too many pixels for device
#     ERROR_BAD_CMD = 4  # Unknown Command
# 
# Path: bibliopixel/drivers/serial/driver.py
# class Serial(DriverBase):
# class TeensySmartMatrix(Serial):
#     def __init__(self, ledtype=None, num=0, dev='',
#                  c_order='RGB', spi_speed=2,
#                  gamma=None, restart_timeout=3,
#                  device_id=None, hardwareID="1D50:60AB",
#                  baudrate=921600, **kwds):
#     def cleanup(self):
#     def _connect(self):
#     def set_device_brightness(self, brightness):
#     def _send_packet(self):
#     def _compute_packet(self):
#     def _send_sync(self):
#     def _read(self):
#     def _close(self):
#     def _write(self, packet):
#     def _flushInput(self):
#     def __init__(self, width, height, dev="", device_id=None,
#                  hardwareID="16C0:0483", **kwds):
# REBOOT_MESSAGE = """Reconfigure and reboot needed!
# Waiting for controller to restart..."""
# 
# Path: test/bibliopixel/drivers/dummy_test.py
# def clock_only_project():
#     return argparse.Namespace(clock=clock.Clock())


import unittest
from unittest import mock
from bibliopixel.drivers.return_codes import RETURN_CODES
from bibliopixel.drivers.serial import driver
from test.bibliopixel.drivers.dummy_test import clock_only_project


class DriverTest(unittest.TestCase):
    @mock.patch('serial.Serial', autospec=True)
    @mock.patch('bibliopixel.drivers.serial.devices.DevicesImpl', autospec=True)
    def test_driver(self, DevicesImpl, Serial):

# Path: bibliopixel/drivers/return_codes.py
# class RETURN_CODES:
#     SUCCESS = 255  # All is well
#     REBOOT = 42  # Device reboot needed after configuration
#     ERROR = 0  # Generic error
#     ERROR_SIZE = 1  # Data received does not match given command length
#     ERROR_UNSUPPORTED = 2  # Unsupported command
#     ERROR_PIXEL_COUNT = 3  # Too many pixels for device
#     ERROR_BAD_CMD = 4  # Unknown Command
# 
# Path: bibliopixel/drivers/serial/driver.py
# class Serial(DriverBase):
# class TeensySmartMatrix(Serial):
#     def __init__(self, ledtype=None, num=0, dev='',
#                  c_order='RGB', spi_speed=2,
#                  gamma=None, restart_timeout=3,
#                  device_id=None, hardwareID="1D50:60AB",
#                  baudrate=921600, **kwds):
#     def cleanup(self):
#     def _connect(self):
#     def set_device_brightness(self, brightness):
#     def _send_packet(self):
#     def _compute_packet(self):
#     def _send_sync(self):
#     def _read(self):
#     def _close(self):
#     def _write(self, packet):
#     def _flushInput(self):
#     def __init__(self, width, height, dev="", device_id=None,
#                  hardwareID="16C0:0483", **kwds):
# REBOOT_MESSAGE = """Reconfigure and reboot needed!
# Waiting for controller to restart..."""
# 
# Path: test/bibliopixel/drivers/dummy_test.py
# def clock_only_project():
#     return argparse.Namespace(clock=clock.Clock())


# Path: test/bibliopixel/drivers/serial/driver_test.py
import unittest
from unittest import mock
from bibliopixel.drivers.return_codes import RETURN_CODES
from bibliopixel.drivers.serial import driver
from test.bibliopixel.drivers.dummy_test import clock_only_project



class DriverTest(unittest.TestCase):
    @mock.patch('serial.Serial', autospec=True)
    @mock.patch('bibliopixel.drivers.serial.devices.DevicesImpl', autospec=True)
    def test_driver(self, DevicesImpl, Serial):

        device_id, port, version = 10, 23, 5