-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
IDLE: Add idlelib.config.IdleConf unittest #75100
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
Comments
Add idlelib.config.IdleConf unittest. |
After this unittest is merged, I would like to first cleanup config.py source code, then modify it more general way. |
Yes, go ahead next with name changes and use of modern features such as sets and comprehensions. Please discuss 'general changes before coding. When we added Linux Modern keys a year ago, I combined two functions into IdleConf.current_colors_and_keys. I suspect that there are other duplications to remove. Except for extensions, current values in default configs should not change, as doing so will break past versions. So using them in tests is good, as it will detect unwanted changes to those files. I hope the list of extensions goes down, but when it does, we can change the tests. |
Whatever is merged with PR_2691, further improvements can be made in further PRs either on this issue or others that work on config code. I still think this test is slower than it should be -- the change to deep copy either made no difference or made it slower, but I will try profiling before experimenting more. In config, the warning prints in the directory search should use _warn, which can be blocked and mocked while testing. 4% uncovered in the file is probably 6% of IdleConf. At least some is error branches that might be interesting to trigger. |
The deepcopy does not work on 3.6. Any fix should be applied to 3.7 as well. If nothing else, we should try to reload with read_string. This is a blocker for merging anything else into config and test_config. |
PR 2754 changed it to use |
Thanks. I will look at it tomorrow and if it seems ok, prepare a new combined backport and see if it passes. |
Please see bpo-30968: "test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x". |
PR2769 is the fix for master for test_get_font for bpo-30968. The listing here is a cross-reference. The fix was incorporated into the 3.6 backport PR2753 before it was merged. This issue is closed, having increased coverage from 46% to 96%. Further work on config and test config should be new issues building on top of this one. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: