Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-113903: Fix an IDLE configdialog test#113973

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

Merged
terryjreedy merged 4 commits intopython:mainfromterryjreedy:clickit
Jan 12, 2024
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
NextNext commit
gh-113903: Fix an IDLE configdialog test
Fix an extremely rare failure in test_highlight_target_text_mousethat happens if a line of the Highlight tab text sample is notvisible.  If so, bbox() in clich_char() returns None anditeration fails.Call click_char just once per tag name.
  • Loading branch information
@terryjreedy
terryjreedy committedJan 12, 2024
commitb75d281e980739598befda6ec4e54e744ec9371f
11 changes: 6 additions & 5 deletionsLib/idlelib/idle_test/test_configdialog.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -425,15 +425,16 @@ def test_highlight_target_text_mouse(self):
count = 0
hs = d.highlight_sample
hs.focus_force()
hs.see(1.0)
hs.update_idletasks()

def tag_to_element(elem):
for element, tag in d.theme_elements.items():
elem[tag] = element

def click_it(start):
x, y, dx, dy = hs.bbox(start)
def click_char(start_index):
"Simulate click on character."
hs.see(start_index)
hs.update_idletasks()
x, y, dx, dy = hs.bbox(start_index)
x += dx // 2
y += dy // 2
hs.event_generate('<Enter>', x=0, y=0)
Expand All@@ -449,7 +450,7 @@ def click_it(start):
for tag in hs.tag_names():
for start_index in hs.tag_ranges(tag)[0::2]:
count += 1
click_it(start_index)
click_char(start_index)
eq(d.highlight_target.get(), elem[tag])
eq(d.set_highlight_target.called, count)

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp