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

Add test_turtledemo for colorizer in turtledemo #104428

Open
Assignees
terryjreedy
Labels
stdlibPython modules in the Lib dirtestsTests in the Lib/test dirtopic-IDLE
@terryjreedy

Description

@terryjreedy

A colorizer change could potentially break the use of colorizer in turtledemo.main. Relevant code:

 92 from idlelib.colorizer import ColorDelegator, color_config 93 from idlelib.percolator import Percolator# __init__ creates root and on line 166 calls makeTextFrame# makeTextFrame(self, root) (line 211) makes a Frame and then a Text213         self.text = text = Text(text_frame, ...215         color_config(text)  # After call to makeTextFrame() in def __init__().195         Percolator(self.text).insertfilter(ColorDelegator())

The Percolator call can and should follow the color_config call. I propose to move the imports and those two lines to a new setup_colorizer(text) function in colorizer.py. Next addfrom idlelib.colorizer import setup_colorizer andsetup_colorizer(text) to turtledemo. Then add a simple test of setup_colorizer to test_colorizer: create root, add Text, setup_colorizer, add some text with special items, and check that they are tagged. Branch is colordemo.

Metadata

Metadata

Assignees

Labels

stdlibPython modules in the Lib dirtestsTests in the Lib/test dirtopic-IDLE

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp