Skip to content

test_doctest failure with ASCII filesystem encoding #54332

Closed

Description

@vstinner
BPO 10123
Nosy @vstinner

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 = None
closed_at = <Date 2010-10-16.21:55:15.871>
created_at = <Date 2010-10-16.14:15:53.145>
labels = ['tests', 'expert-unicode']
title = 'test_doctest failure with ASCII filesystem encoding'
updated_at = <Date 2010-10-16.21:55:15.870>
user = 'https://github.com/vstinner'

bugs.python.org fields:

activity = <Date 2010-10-16.21:55:15.870>
actor = 'vstinner'
assignee = 'none'
closed = True
closed_date = <Date 2010-10-16.21:55:15.871>
closer = 'vstinner'
components = ['Tests', 'Unicode']
creation = <Date 2010-10-16.14:15:53.145>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 10123
keywords = []
message_count = 3.0
messages = ['118870', '118900', '118901']
nosy_count = 1.0
nosy_names = ['vstinner']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue10123'
versions = ['Python 3.2']

Activity

  1. vstinner commented on Oct 16, 2010

    @vstinner
    MemberAuthor

    In bpo-10114, I changed parser filename encoding from utf-8/strict to the filesystem encoding/surrogateescape. With C locale, the filesystem encoding is ASCII and test_doctest fails because it uses an unencoable filename (foo-bä[email protected]).

    A solution is to write a test specific to non-ascii filenames and skip it if the filename is not encodable (try if os.fsencode() raises an UnicodeEncodeError or not), and use only ascii filenames in the other tests.

  2. vstinner commented on Oct 16, 2010

    @vstinner
    MemberAuthor

    Failures occurred on:
    http://www.python.org/dev/buildbot/builders/AMD64%20Gentoo%20Wide%203.x
    http://www.python.org/dev/buildbot/builders/sparc%20solaris10%20gcc%203.x

    test_zipimport_support does also fail, but it is linked to test_doctest failures.

  3. vstinner commented on Oct 16, 2010

    @vstinner
    MemberAuthor

    Fixed by r85578.

  4. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions