test/full_stack: style and add note about loopback test connections

This commit is contained in:
Sebastien Bourdeauducq 2014-11-07 14:15:40 -08:00
parent 62677ed660
commit 391ff10345

View File

@ -7,7 +7,7 @@ from artiq.coredevice import comm_serial, core, runtime_exceptions, rtio
from artiq.sim import devices as sim_devices from artiq.sim import devices as sim_devices
NO_HARDWARE = bool(os.getenv("ARTIQ_NO_HARDWARE")) no_hardware = bool(os.getenv("ARTIQ_NO_HARDWARE"))
def _run_on_device(k_class, **parameters): def _run_on_device(k_class, **parameters):
@ -136,7 +136,7 @@ class _Exceptions(AutoContext):
self.trace.append(104) self.trace.append(104)
@unittest.skipIf(NO_HARDWARE, "no hardware") @unittest.skipIf(no_hardware, "no hardware")
class ExecutionCase(unittest.TestCase): class ExecutionCase(unittest.TestCase):
def test_primes(self): def test_primes(self):
l_device, l_host = [], [] l_device, l_host = [], []
@ -208,8 +208,10 @@ class _RTIOSequenceError(AutoContext):
self.o.pulse(25*us) self.o.pulse(25*us)
@unittest.skipIf(NO_HARDWARE, "no hardware") @unittest.skipIf(no_hardware, "no hardware")
class RTIOCase(unittest.TestCase): class RTIOCase(unittest.TestCase):
# Connect channels 0 and 1 together for this test
# (C11 and C13 on Papilio Pro)
def test_loopback(self): def test_loopback(self):
npulses = 4 npulses = 4
with comm_serial.Comm() as comm: with comm_serial.Comm() as comm: