Skip to content

Improve speed of test_tokenize.StringPrefixTest.test_prefixes #134752

Open
@ericvsmith

Description

@ericvsmith

Bug report

Bug description:

It takes about 0.5 seconds to run, because it's doing 127,452 eval statements. It could no doubt be sped up, although I might have to sacrifice some completeness. For example, one simplifying assumption is that all multi-character string prefixes must begin with one of the single-character prefix. I guess it's possible that this won't always be the case, but it seems likely to continue.

CPython versions tested on:

3.15

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

Labels

3.14bugs and security fixes3.15new features, bugs and security fixesstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions