Updated class structure to allow for extensions later

This commit is contained in:
2026-03-12 19:23:36 +00:00
parent db747b0e7d
commit 67dacd2a2f

View File

@@ -45,7 +45,24 @@ class OSDiagnostics:
self.motorclass = motorclass self.motorclass = motorclass
self.successfultests = 0 self.successfultests = 0
self.failedtests = {} self.failedtests = {}
def testUerrno(self):
uerrnotestobject = UerrnoTest(self.hub, self.motorclass)
uerrnotestobject.testeagain()
uerrnotestobject.testebusy()
uerrnotestobject.testecanceled()
uerrnotestobject.testeinval()
uerrnotestobject.testeio()
uerrnotestobject.testenodev()
uerrnotestobject.testeopnotsupp()
uerrnotestobject.testeperm()
uerrnotestobject.testetimedout()
uerrnotestobject.print_results()
self.successfultests += uerrnotestobject.successfultests
self.failedtests.update(uerrnotestobject.failedtests)
class UerrnoTest(OSDiagnostics):
def testeagain(self): def testeagain(self):
# Triggered by calling multitask() nested inside another multitask() # Triggered by calling multitask() nested inside another multitask()
print("Starting Test 1/9: EAGAIN - Try Again Error") print("Starting Test 1/9: EAGAIN - Try Again Error")