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

Unicode File Test failures (PEP 277 on Mac OS X) #52427

Closed
voidspace opened this issue Mar 20, 2010 · 8 comments
Closed

Unicode File Test failures (PEP 277 on Mac OS X) #52427

voidspace opened this issue Mar 20, 2010 · 8 comments
Assignees
Labels
OS-mac topic-unicode type-bug An unexpected behavior, bug, or error

Comments

@voidspace
Copy link
Contributor

BPO 8180
Nosy @brettcannon, @ronaldoussoren, @ned-deily, @voidspace, @florentx
Files
  • issue8180_pep277_darwin.diff: Patch, apply to 2.x
  • issue8180_pep277_additions_v3.diff: Patch, apply to 2.x
  • 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/ronaldoussoren'
    closed_at = <Date 2010-03-21.18:53:36.903>
    created_at = <Date 2010-03-20.02:56:01.580>
    labels = ['OS-mac', 'type-bug', 'expert-unicode']
    title = 'Unicode File Test failures (PEP 277 on Mac OS X)'
    updated_at = <Date 2010-03-21.18:53:36.902>
    user = 'https://github.com/voidspace'

    bugs.python.org fields:

    activity = <Date 2010-03-21.18:53:36.902>
    actor = 'flox'
    assignee = 'ronaldoussoren'
    closed = True
    closed_date = <Date 2010-03-21.18:53:36.903>
    closer = 'flox'
    components = ['macOS', 'Unicode']
    creation = <Date 2010-03-20.02:56:01.580>
    creator = 'michael.foord'
    dependencies = []
    files = ['16596', '16612']
    hgrepos = []
    issue_num = 8180
    keywords = ['patch']
    message_count = 8.0
    messages = ['101361', '101366', '101370', '101375', '101409', '101429', '101433', '101443']
    nosy_count = 5.0
    nosy_names = ['brett.cannon', 'ronaldoussoren', 'ned.deily', 'michael.foord', 'flox']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue8180'
    versions = ['Python 2.7', 'Python 3.2']

    @voidspace
    Copy link
    Contributor Author

    I'm *assuming* this is a Mac OS X issue. (10.6.2)

    ./python.exe Lib/test/test_pep277.py
    test_directory (main.UnicodeFileTests) ... ok
    test_failures (main.UnicodeFileTests) ... ok
    test_listdir (main.UnicodeFileTests) ... FAIL
    test_open (main.UnicodeFileTests) ... ok
    test_rename (main.UnicodeFileTests) ... ok

    ======================================================================
    FAIL: test_listdir (main.UnicodeFileTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "Lib/test/test_pep277.py", line 92, in test_listdir
        self.assertEqual(sf2, set(self.files))
    AssertionError: Items in the first set but not the second:
    u'@test_969_tmp/\u0393\u03b5\u03b9\u03b1\u0301-\u03c3\u03b1\u03c2'
    u'@test_969_tmp/Gru\u0308\xdf-Gott'
    u'@test_969_tmp/\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0438\u0306\u0442\u0435'
    u'@test_969_tmp/\u306b\u307b\u309a\u3093'
    Items in the second set but not the first:
    u'@test_969_tmp/\u0393\u03b5\u03b9\u03ac-\u03c3\u03b1\u03c2'
    u'@test_969_tmp/\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435'
    u'@test_969_tmp/Gr\xfc\xdf-Gott'
    u'@test_969_tmp/\u306b\u307d\u3093'

    Ran 5 tests in 0.021s

    FAILED (failures=1)
    Traceback (most recent call last):
      File "Lib/test/test_pep277.py", line 120, in <module>
        test_main()
      File "Lib/test/test_pep277.py", line 115, in test_main
        test_support.run_unittest(UnicodeFileTests)
      File "/compile/python-back/Lib/test/test_support.py", line 1031, in run_unittest
        _run_suite(suite)
      File "/compile/python-back/Lib/test/test_support.py", line 1014, in _run_suite
        raise TestFailed(err)
    test.test_support.TestFailed: Traceback (most recent call last):
      File "Lib/test/test_pep277.py", line 92, in test_listdir
        self.assertEqual(sf2, set(self.files))
    AssertionError: Items in the first set but not the second:
    u'@test_969_tmp/\u0393\u03b5\u03b9\u03b1\u0301-\u03c3\u03b1\u03c2'
    u'@test_969_tmp/Gru\u0308\xdf-Gott'
    u'@test_969_tmp/\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0438\u0306\u0442\u0435'
    u'@test_969_tmp/\u306b\u307b\u309a\u3093'
    Items in the second set but not the first:
    u'@test_969_tmp/\u0393\u03b5\u03b9\u03ac-\u03c3\u03b1\u03c2'
    u'@test_969_tmp/\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435'
    u'@test_969_tmp/Gr\xfc\xdf-Gott'
    u'@test_969_tmp/\u306b\u307d\u3093'

    @ned-deily
    Copy link
    Member

    r78585 to test_pep277.py recently enabled this test for all POSIX systems but note the warning in r33595.

    @florentx
    Copy link
    Mannequin

    florentx mannequin commented Mar 20, 2010

    This patch should fix the test on OS X platforms.

    @florentx florentx mannequin added OS-mac topic-unicode type-bug An unexpected behavior, bug, or error labels Mar 20, 2010
    @florentx
    Copy link
    Mannequin

    florentx mannequin commented Mar 20, 2010

    A patch with more Unicode normalization tests.

    Could you test it on Windows or Mac OS X?

    @voidspace
    Copy link
    Contributor Author

    The test passes with the first patch applied (darwin.diff). With the second patch applied I get two failures:

    ======================================================================
    ERROR: test_normalize (main.UnicodeFileTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "Lib/test/test_pep277.py", line 121, in test_normalize
        os.stat(name)
    OSError: [Errno 2] No such file or directory: '@test_70346_tmp/\xc2\xa8\xcc\x81\xc2\xb4\xe3\x8f\x95'

    ======================================================================
    FAIL: test_listdir (main.UnicodeFileTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "Lib/test/test_pep277.py", line 145, in test_listdir
        self.assertEqual(len(f1), len(self.files))
    AssertionError: 18 != 19

    Ran 30 tests in 0.292s

    FAILED (failures=1, errors=1)
    Traceback (most recent call last):
      File "Lib/test/test_pep277.py", line 198, in <module>
        test_main()
      File "Lib/test/test_pep277.py", line 191, in test_main
        UnicodeNFKDFileTests,
      File "/compile/python-trunk/Lib/test/test_support.py", line 1031, in run_unittest
        _run_suite(suite)
      File "/compile/python-trunk/Lib/test/test_support.py", line 1014, in _run_suite
        raise TestFailed(err)
    test.test_support.TestFailed: multiple errors occurred

    @florentx
    Copy link
    Mannequin

    florentx mannequin commented Mar 21, 2010

    New patch: removed the offending codepoint '\ufad1'.
    Please try again on OS X, and windows.

    @florentx
    Copy link
    Mannequin

    florentx mannequin commented Mar 21, 2010

    New patch, fixing test_listdir on OS X (hopefully).

    @florentx
    Copy link
    Mannequin

    florentx mannequin commented Mar 21, 2010

    Fixed with r79207 (2.x) and r79209 (3.x).
    Thank you Michael for testing it.

    @florentx florentx mannequin closed this as completed Mar 21, 2010
    @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
    OS-mac topic-unicode type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants