Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e55cf024
Commit
e55cf024
authored
Jan 18, 2019
by
Tal Einat
Committed by
Terry Jan Reedy
Jan 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-35730: IDLE - test squeezer reload() by checking load_font() (GH-11585)
parent
cf27c062
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
Lib/idlelib/idle_test/test_squeezer.py
Lib/idlelib/idle_test/test_squeezer.py
+3
-7
No files found.
Lib/idlelib/idle_test/test_squeezer.py
View file @
e55cf024
...
@@ -293,25 +293,21 @@ class SqueezerTest(unittest.TestCase):
...
@@ -293,25 +293,21 @@ class SqueezerTest(unittest.TestCase):
def
test_reload
(
self
):
def
test_reload
(
self
):
"""Test the reload() class-method."""
"""Test the reload() class-method."""
editwin
=
self
.
make_mock_editor_window
(
with_text_widget
=
True
)
editwin
=
self
.
make_mock_editor_window
(
with_text_widget
=
True
)
text_widget
=
editwin
.
text
squeezer
=
self
.
make_squeezer_instance
(
editwin
)
squeezer
=
self
.
make_squeezer_instance
(
editwin
)
squeezer
.
load_font
=
Mock
()
orig_zero_char_width
=
squeezer
.
zero_char_width
orig_auto_squeeze_min_lines
=
squeezer
.
auto_squeeze_min_lines
orig_auto_squeeze_min_lines
=
squeezer
.
auto_squeeze_min_lines
# Increase both font size and auto-squeeze-min-lines.
# Increase auto-squeeze-min-lines.
text_widget
[
"font"
]
=
(
'Courier'
,
20
)
new_auto_squeeze_min_lines
=
orig_auto_squeeze_min_lines
+
10
new_auto_squeeze_min_lines
=
orig_auto_squeeze_min_lines
+
10
self
.
set_idleconf_option_with_cleanup
(
self
.
set_idleconf_option_with_cleanup
(
'main'
,
'PyShell'
,
'auto-squeeze-min-lines'
,
'main'
,
'PyShell'
,
'auto-squeeze-min-lines'
,
str
(
new_auto_squeeze_min_lines
))
str
(
new_auto_squeeze_min_lines
))
Squeezer
.
reload
()
Squeezer
.
reload
()
# The following failed on Gentoo buildbots. Issue title will be
# IDLE: Fix squeezer test_reload.
#self.assertGreater(squeezer.zero_char_width, orig_zero_char_width)
self
.
assertEqual
(
squeezer
.
auto_squeeze_min_lines
,
self
.
assertEqual
(
squeezer
.
auto_squeeze_min_lines
,
new_auto_squeeze_min_lines
)
new_auto_squeeze_min_lines
)
squeezer
.
load_font
.
assert_called
()
def
test_reload_no_squeezer_instances
(
self
):
def
test_reload_no_squeezer_instances
(
self
):
"""Test that Squeezer.reload() runs without any instances existing."""
"""Test that Squeezer.reload() runs without any instances existing."""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment