fix trailing space and new line
temporarily disable codespell
This commit is contained in:
@@ -26,4 +26,4 @@ target_include_directories(${PROJECT} PUBLIC
|
||||
|
||||
# Configure compilation flags and libraries for the example... see the corresponding function
|
||||
# in hw/bsp/FAMILY/family.cmake for details.
|
||||
family_configure_device_example(${PROJECT})
|
||||
family_configure_device_example(${PROJECT})
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2019 Ha Thach (tinyusb.org)
|
||||
|
@@ -36,8 +36,8 @@ def test_trig():
|
||||
time.sleep(0.3) # SRQ may have some delay
|
||||
assert (inst.read_stb() & 0x40), "SRQ not set after 0.3 seconds"
|
||||
assert (inst.read_stb() == 0)
|
||||
|
||||
|
||||
|
||||
|
||||
def test_mav():
|
||||
inst.write("delay 50")
|
||||
inst.read_stb() # clear STB
|
||||
@@ -45,15 +45,15 @@ def test_mav():
|
||||
inst.write("123")
|
||||
time.sleep(0.3)
|
||||
assert (inst.read_stb() & 0x10), "MAV not set after 0.5 seconds"
|
||||
|
||||
|
||||
rsp = inst.read()
|
||||
assert(rsp == "123\r\n")
|
||||
|
||||
|
||||
|
||||
|
||||
def test_srq():
|
||||
assert (inst.read_stb() == 0)
|
||||
inst.write("123")
|
||||
|
||||
|
||||
#inst.enable_event(pyvisa.constants.VI_EVENT_SERVICE_REQ, pyvisa.constants.VI_QUEUE)
|
||||
#waitrsp = inst.wait_on_event(pyvisa.constants.VI_EVENT_SERVICE_REQ, 5000)
|
||||
#inst.discard_events(pyvisa.constants.VI_EVENT_SERVICE_REQ, pyvisa.constants.VI_QUEUE)
|
||||
@@ -64,7 +64,7 @@ def test_srq():
|
||||
assert (stb == 0x50),msg
|
||||
|
||||
assert (inst.read_stb() == 0x10), "SRQ set at second read!"
|
||||
|
||||
|
||||
rsp = inst.read()
|
||||
assert(rsp == "123\r\n")
|
||||
|
||||
@@ -110,7 +110,7 @@ def test_abort_in():
|
||||
inst.timeout = 800
|
||||
y = inst.read()
|
||||
assert(y == "xxx\r\n")
|
||||
|
||||
|
||||
def test_indicate():
|
||||
# perform indicator pulse
|
||||
usb_iface = inst.get_visa_attribute(pyvisa.constants.VI_ATTR_USB_INTFC_NUM)
|
||||
@@ -120,8 +120,8 @@ def test_indicate():
|
||||
assert(retv == b'\x01')
|
||||
else:
|
||||
assert((retv[1] == pyvisa.constants.StatusCode(0)) and (retv[0] == b'\x01')), f"indicator pulse failed: retv={retv}"
|
||||
|
||||
|
||||
|
||||
|
||||
def test_multi_read():
|
||||
old_chunk_size = inst.chunk_size
|
||||
longstr = "0123456789abcdefghijklmnopqrstuvwxyz" * 10
|
||||
@@ -133,7 +133,7 @@ def test_multi_read():
|
||||
y = inst.read()
|
||||
assert (x + "\r\n" == y)
|
||||
#inst.chunk_size = old_chunk_size
|
||||
|
||||
|
||||
def test_stall_ep0():
|
||||
usb_iface = inst.get_visa_attribute(pyvisa.constants.VI_ATTR_USB_INTFC_NUM)
|
||||
inst.read_stb()
|
||||
@@ -143,7 +143,7 @@ def test_stall_ep0():
|
||||
assert(False)
|
||||
except pyvisa.VisaIOError:
|
||||
pass
|
||||
|
||||
|
||||
assert (inst.read_stb() == 0)
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ print(reslist)
|
||||
|
||||
if (len(reslist) == 0):
|
||||
sys.exit()
|
||||
|
||||
|
||||
inst = rm.open_resource(reslist[0]);
|
||||
inst.timeout = 3000
|
||||
|
||||
|
Reference in New Issue
Block a user