GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||
GeezerVison is showing github.com — gh-130428: Add tests for delattr suggestions by Pranjal095 · Pull Request #130455 · python/cpython Conversation
|
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| actual = self.get_suggestion(lambda: delattr(obj, 'somethingverywrong')) | ||
| self.assertNotIn("blech", actual) | ||
|
|
||
| def test_delattr_error_bad_suggestions_do_not_trigger_for_small_names(self): |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This test is the same as for getattr, can't it be refactored so that we use the same fixtures but with different calls to self.get_suggestion?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I was actually thinking of doing that, but decided to go with duplication for better readability.
On reconsideration with your review, I believe it is redundant and should be refactored. Will update the PR accordingly.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@Pranjal095 Some of the tests you added are failing, could you fix them please? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@tomasr8 The reason for the proposed tests failing is that the pull request implementing name suggestions for delattr is yet to be merged into the main branch. Pull request linked here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Let's put it as a draft until #130427 is merged then. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Usually we'd merge a new feature together with its tests. Could you combine the PRs into one? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…gestions-combined This merges the delattr suggestion feature implementation by @sobolevn from PR python#130427 with added tests from PR python#130455.
|
I've made a new PR combining the commits from both corresponding forks. Kindly let me know if there are any further modifications to be made. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.