Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-99894: Ensure the local names don't collide with the test file in traceback suggestion error checking#99895
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…le in traceback suggestion error checking
vstinner commentedNov 30, 2022
This branch doesn't work for me: |
vstinner commentedNov 30, 2022
Ah, this PR changes test_getattr_error_bad_suggestions_do_not_trigger_for_small_names(), but not test_import_from_error_bad_suggestions_do_not_trigger_for_small_names(). You should also change test_import_from_error_bad_suggestions_do_not_trigger_for_small_names(), no? |
…test file in traceback suggestion error checking
pablogsal commentedNov 30, 2022
Done! |
vstinner commentedNov 30, 2022
I ran |
vstinner commentedNov 30, 2022
Another test: |
vstinner commentedNov 30, 2022
Another test: |
vstinner left a comment
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: I tested functionnaly the change, it does fix#99894
I have a minor suggestion.
Lib/test/test_traceback.py Outdated
| fornamein ("b","v","m","py"): | ||
| withself.subTest(name=name): | ||
| actual=self.get_suggestion(MyClass,name) | ||
| self.assertNotIn("you mean",actual) |
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.
Maybe check forDid you mean? Same remark for the other test.
Other test_traceback tests check for this (a little bit longer) pattern.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
vstinner commentedDec 1, 2022
test_threading of "Address sanitizer" failed (env changed). I re-ran this CI job. |
vstinner commentedDec 1, 2022
Python 3.10 and 3.11 are not affected. |
bedevere-bot commentedDec 1, 2022
|
* main: (112 commits)pythongh-99894: Ensure the local names don't collide with the test file in traceback suggestion error checking (python#99895)pythongh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (pythonGH-99613) Doc: Add summary line to isolation_level & autocommit sqlite3.connect params (python#99917)pythonGH-98906 ```re``` module: ```search() vs. match()``` section should mention ```fullmatch()``` (pythonGH-98916)pythongh-89189: More compact range iterator (pythonGH-27986) bpo-47220: Document the optional callback parameter of weakref.WeakMethod (pythonGH-25491)pythonGH-99905: Fix output of misses in summarize_stats.py execution counts (pythonGH-99906)pythongh-99845: PEP 670: Convert PyObject macros to functions (python#99850)pythongh-99845: Use size_t type in __sizeof__() methods (python#99846)pythonGH-99877) Fix typo in exception message in `multiprocessing.pool` (python#99900)pythongh-87092: move all localsplus preparation into separate function called from assembler stage (pythonGH-99869)pythongh-99891: Fix infinite recursion in the tokenizer when showing warnings (pythonGH-99893)pythongh-99824: Document that sqlite3.connect implicitly open a transaction if autocommit=False (python#99825)pythonGH-81057: remove static state from suggestions.c (python#99411) Improve zip64 limit error message (python#95892)pythongh-98253: Break potential reference cycles in external code worsened by typing.py lru_cache (python#98591)pythongh-99127: Allow some features of syslog to the main interpreter only (pythongh-99128)pythongh-82836: fix private network check (python#97733) Docs: improve accuracy of socketserver reference (python#24767) ...
| self.assertNotIn("vvv",actual) | ||
| self.assertNotIn("mom",actual) | ||
| self.assertNotIn("Didyou mean",actual) | ||
| self.assertNotIn("'vvv",actual) |
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 don't know if this has any effect but there is a' missing here
… test file in traceback suggestion error checking (python#99895)"This reverts commit0563be2.
Uh oh!
There was an error while loading.Please reload this page.