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
Fix mechRepr
on controls to always return a native str.
#36
Conversation
@mgedmin I am not sure why GitHub thinks that you are the author of this commit. Maybe my git-foo is only too little. |
@icemac have you perchance copied my |
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'm not very happy to see a commit I didn't write attributed to me. You should be able to fix that with git commit --amend --author="Full Name <email@example.com>"
, followed by git push --force-with-lease
.
Otherwise LGTM!
CHANGES.rst
Outdated
@@ -5,7 +5,7 @@ CHANGES | |||
5.2.3 (unreleased) | |||
------------------ | |||
|
|||
- Nothing changed yet. | |||
- Fix ``mechRepr`` on controls to always return a native str. |
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.
Link to GitHub issue/pull request for more context?
suite = unittest.TestSuite() | ||
suite.addTests([ | ||
unittest.makeSuite(TestDisplayValue), | ||
unittest.makeSuite(TestMechRepr), |
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.
Instead of repeating unittest.makeSuite()
for every test class, I recommend unittest.defaultTestLoader.loadTestsFromName(__name__)
, which finds all test classes automatically.
Fixes #38 As the scenario described in the ticket requires the `mechRepr` to be of the same type for all controls I decided to adapt the two remaining control classes which returned unicode to the str approach used by of the majority of the controls.
@mgedmin Thank you for your review. I fixed the commit as you suggested including the wrong author. (I am not re-using your config, maybe this was an error in my git client.) |
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!
The error scenario is the following:
browser.getControl()
is used to select a not existing control.As the scenario described above requires the mechRepr to be of the same type I decided to adapt the two remaining control classes which returned unicode to the str approach used by of the majority of the controls.
Fixes #38.