-
Notifications
You must be signed in to change notification settings - Fork 670
Closed
Labels
Description
I understand that the HW based test has been disabled. However, it seems to me that I can still run it and there are a few error messages which may point to the errors of the test codes (probably they are not matching with the latest pyusb codes).
I just built the bmfw from Wander (https://github.com/walac/bmfw) and here is the run log. I am using Python 3.9.5 within a virtual environment under Windows 10 64bit. The two failed cases are kind of expected because my FW built configuration may not match the test code (for example no isochronous endpoint). But the two errors may be a problem.
(py39venv) C:\work\libusb\pyusb\tests [master ≡ +1 ~0 -0 !]> python
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(py39venv) C:\work\libusb\pyusb\tests [master ≡ +1 ~0 -0 !]> python .\testall.py
FE.F.........E......
======================================================================
ERROR: runTest (test_control.ControlTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\work\libusb\pyusb\tests\test_control.py", line 56, in runTest
self.test_getset_descriptor()
File "C:\work\libusb\pyusb\tests\test_control.py", line 107, in test_getset_descriptor
self.assertEqual(struct.unpack(dev_fmt, ret.tostring()), dev_descr)
AttributeError: 'array.array' object has no attribute 'tostring'
======================================================================
ERROR: runTest (test_legacy.LegacyTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\work\libusb\pyusb\tests\test_legacy.py", line 63, in runTest
self.test_get_descriptor()
File "C:\work\libusb\pyusb\tests\test_legacy.py", line 241, in test_get_descriptor
self.assertEqual(struct.unpack(dev_fmt, ret.tostring()), dev_descr)
AttributeError: 'array.array' object has no attribute 'tostring'
======================================================================
FAIL: runTest (test_backend.BackendTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\work\libusb\pyusb\tests\test_backend.py", line 64, in runTest
self.test_iso_write_read()
File "C:\work\libusb\pyusb\tests\test_backend.py", line 205, in test_iso_write_read
self.__write_read(
File "C:\work\libusb\pyusb\tests\test_backend.py", line 275, in __write_read
self.assertEqual(ret, length, str(ret) + ' != ' + str(length))
AssertionError: 0 != 64 : 0 != 64
======================================================================
FAIL: runTest (test_integration.DeviceTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\work\libusb\pyusb\tests\test_integration.py", line 68, in runTest
self.test_write_read()
File "C:\work\libusb\pyusb\tests\test_integration.py", line 165, in test_write_read
self.assertTrue(
AssertionError: False is not true : array('B', [0, 1, 5, 4, 3, 2, 1, 0, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 0, 1, 5, 4, 3, 2, 1, 0, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) != array('B', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]), in interface = 2
----------------------------------------------------------------------
Ran 20 tests in 2.694s
FAILED (failures=2, errors=2)