Skip to content
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

Roundtrip-test tokenize.untokenize(iterable_of_5_tuples) #64949

Open
terryjreedy opened this issue Feb 23, 2014 · 4 comments
Open

Roundtrip-test tokenize.untokenize(iterable_of_5_tuples) #64949

terryjreedy opened this issue Feb 23, 2014 · 4 comments
Assignees
Labels
3.11 only security fixes stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@terryjreedy
Copy link
Member

BPO 20750
Nosy @terryjreedy, @iritkatriel

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:

assignee = 'https://github.com/terryjreedy'
closed_at = None
created_at = <Date 2014-02-23.22:07:06.807>
labels = ['tests', 'type-bug', 'library', '3.11']
title = 'Roundtrip-test tokenize.untokenize(iterable_of_5_tuples)'
updated_at = <Date 2021-12-03.11:39:03.920>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2021-12-03.11:39:03.920>
actor = 'iritkatriel'
assignee = 'terry.reedy'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)', 'Tests']
creation = <Date 2014-02-23.22:07:06.807>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 20750
keywords = []
message_count = 4.0
messages = ['212034', '212040', '212043', '407578']
nosy_count = 3.0
nosy_names = ['terry.reedy', 'python-dev', 'iritkatriel']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue20750'
versions = ['Python 3.11']

@terryjreedy
Copy link
Member Author

Currently, test_tokenize.roundtrip only tests the 2-tuple mode of untokenize. The currently buggy 5-tuple mode needs to be tested also, as far as possible, to reduce the chance of introducing more bugs when fixing current bugs. When this is done, all the constructed tests pass. Good so far.

The doctest normally tests 10 files selected from test/test_*.py and a few tries showed no problem. However, when testing all with -ucpu.
F:\Python\dev> 3\py33\pcbuild\python_d -m test -ucpu test_tokenize
7 failed. So we must remove these from the list of candidates until the failure cause is determined and either fixed or determined not fixable (as with test_3131.py).

As suggested in the revised docstring, finding the failure items for these 7 would be much easier if the file roundtrip test were removed from the doctest and made into a unittest with assertEqual.

@terryjreedy terryjreedy self-assigned this Feb 23, 2014
@terryjreedy terryjreedy added stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Feb 23, 2014
@python-dev
Copy link
Mannequin

python-dev mannequin commented Feb 23, 2014

New changeset 8d6dd02a973f by Terry Jan Reedy in branch '3.3':
Issue bpo-20750, Enable roundtrip tests for new 5-tuple untokenize. The
http://hg.python.org/cpython/rev/8d6dd02a973f

New changeset 73aa6d672b81 by Terry Jan Reedy in branch 'default':
Merge with 3.3, bpo-20750
http://hg.python.org/cpython/rev/73aa6d672b81

@terryjreedy
Copy link
Member Author

The 2.7 tokenize tests do not have roundtrip tests.

Excluding the 7 files is a temporary hack. The issue should stay open until each either passes and is removed from the exclusion list or is determined to be a permanent exclusion, like test_pep3131.

@iritkatriel
Copy link
Member

The 7 tests are still removed and need to be checked:

# Tokenize is broken on test_pep3131.py because regular expressions are

@iritkatriel iritkatriel added the 3.11 only security fixes label Dec 3, 2021
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants