-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support for robotframework 4.x #21
Conversation
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.
Probably have to talk face-to-face about one of the comments in the interface
src/oxygen/__init__.py
Outdated
__all__ = ['BaseHandler', 'listener', 'OxygenLibrary', 'RobotInterface', | ||
'get_keywords_from'] |
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.
__all__
should be used to declare the public interface of the module. get_keywords_from
is not intended to be called from outside of Oxygen, so it should not be defined in __all__
. Nor should RobotInterface
for that matter; the old code was wrong as well.
src/oxygen/robot3_interface.py
Outdated
SETUP_TYPE = RobotResultKeyword.SETUP_TYPE | ||
KEYWORD_TYPE = RobotResultKeyword.KEYWORD_TYPE | ||
TEARDOWN_TYPE = RobotResultKeyword.TEARDOWN_TYPE |
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.
Why are we changing the old RF3 interface in any way? To my mind, it should not need to change at all.
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.
As far as I can see, these are needed only for tests. I do not quite see why we would change the interface to appease tests; rather, the tests should be re-thought to verify correct things.
src/oxygen/robot3_interface.py
Outdated
KEYWORD_TYPE = RobotResultKeyword.KEYWORD_TYPE | ||
SETUP_TYPE = RobotResultKeyword.SETUP_TYPE | ||
TEARDOWN_TYPE = RobotResultKeyword.TEARDOWN_TYPE |
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.
Why are we exposing this new functionality? What outside of interface needs this information?
1d6f479
to
0817e67
Compare
0817e67
to
c4a9a3f
Compare
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.
Apparently Github does not allow me to make comments/suggestions on lines that have not been changed, so let's do this the stupid way then
Please also fix the problems in RobotInterfaceBasicTests
we discussed yesterday:
~line 166:
for subsuite in converted[0].suites:
self.assertIsInstance(converted_suite, RobotSuite)
# ^ this should be:
for subsuite in converted[0].suites:
self.assertIsInstance(subsuite, RobotSuite)
~line 171
for kw in get_keywords_from(converted_suite.tests[1]):
self.assertIsInstance(kw, RobotKeyword)
# ^ this should be:
for kw in get_keywords_from(converted[0].tests[1]):
self.assertIsInstance(kw, RobotKeyword)
~line 174:
for message in get_keywords_from(converted_suite.tests[1])[0].messages:
self.assertIsInstance(message, RobotMessage)
# ^ this should be:
for message in get_keywords_from(converted[0].tests[1])[0].messages:
self.assertIsInstance(message, RobotMessage)
src/oxygen/__init__.py
Outdated
|
||
__all__ = ['BaseHandler', 'listener', 'OxygenLibrary', 'RobotInterface'] | ||
__all__ = ["BaseHandler", "listener", "OxygenLibrary"] |
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.
Wrong quotes, should be single quotes as anywhere else
c4a9a3f
to
8b426ee
Compare
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.
LGTM 💖
Fixes #18 |
Add support for robotframework 4.x alongside with previous versions.