-
-
Notifications
You must be signed in to change notification settings - Fork 821
Unittests/Python 3: update syntax, catch unbound method registration test in extension points as expected failure #9726
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
Merged
michaelDCurran
merged 13 commits into
nvaccess:threshold_py3_staging
from
josephsl:py3unittest
Jun 13, 2019
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3534581
Unittest/Python 3: update copyright years. Re #9720.
josephsl 2d9ea54
Unittest/test driver/Python 3: no more unicode/decoding, proper relat…
josephsl d63cc4a
Unittest/base object tests/Python 3: proper relative import. Re #9720.
josephsl 0d833ea
Unittest/braille tests/Python 3: proper relative import. Re #9720.
josephsl 641d355
Unittest/braille tables/Python 3: dict.itervalues -> dict.values. Re …
josephsl e60fb82
Unittest/control types/Python 3: dict.iteritems -> dict.items. Re #9720.
josephsl d55aaa9
Unittest/text provider/Python 3: just use text as given instead of co…
josephsl 87fffcc
Unittest/script handler/Python 3: assertItemsEqual -> assertCountEqua…
josephsl f85ffbe
Unittest/extension points/Python 3: mark unbound method registration …
josephsl 741d130
Unittest/base object/Python 3: self.assertRaisesRegexp -> self.assert…
josephsl 59f0b6f
Unittests/review action: remove unnecessary comments. Re #9720.
josephsl 46ed14e
Unittests/control types: contorlTypes.__dict__ -> vars(contorlTypes).…
josephsl 629653b
Extension points/util: add a comment about failing unittest. Re #9720.
josephsl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please add a comment to the register method in extensionPoints. That code really needs a revisit.
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.
In Python3, unbound methods no longer exist. Rather, fetching a method from a class directly (I.e. not from an instance) gives you back a normal function.
In the case of register: it will handle these as normal functions, and succeed.
I don't believe this would cause any problems for us: the handler will be called later like any normal function, as far as it makes sense to call an unbound method function. I.e. the code registering this function would have to pass in self as one of its arguments to make the function work in any meaningful way.
We could argue that we should disallow registering unbound method functions still, but there is no way of detecting these -- they are just functions.
I am happy to leave this in the code as a disabled test and approve/merge this as is. Though I would be interested in thoughts from @jcsteh on this. Should we just remove the test?