-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run-unit-tests on ykush devices #12561
Conversation
unit-tests/py/rspy/acroname.py
Outdated
|
||
|
||
if __name__ == '__main__': | ||
device = Acroname() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I say lets call it acroname
(lower case) and not device as we call our cameras devices
In general:
I think the direction is good, but maybe the 'relay' (I like 'hub' better) is your interface that acroname and ykush implement? You still need a create() function, but that's about it. Once you have a hub instance (that's your |
ykush and acroname are now inherting from usb_relay attempting to support functionality even when the hub is connected to other usb hub
…ice_hub, relay->hub
unit-tests/py/rspy/device_hub.py
Outdated
return None | ||
except acroname.NoneFoundError(): | ||
return None | ||
except: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not valid, I get:
TypeError: catching classes that do not inherit from BaseException is not allowed
It should be:
except BaseException:
Same in line 176.
unit-tests/py/rspy/device_hub.py
Outdated
return acroname.Acroname() | ||
except ModuleNotFoundError: | ||
return None | ||
except acroname.NoneFoundError(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the ()
unit-tests/py/rspy/acroname.py
Outdated
@@ -41,321 +41,328 @@ def usage(): | |||
log.w( 'No acroname library is available!' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is now less relevant now that there're alternatives - let's turn this into a log.d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And same in ykush
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And make it lower-case and remove the !
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I'll do the same on ykush.py (log.w -> log.d)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nir-Az this needs to be coordinated with changes to libCI, so I'm not merging yet
Tracked on [LRS-991]