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

test_api: Normalize file name and path #608

Merged
merged 1 commit into from
Nov 22, 2021

Commits on Nov 10, 2021

  1. test_api: Normalize file name and path

    test_list_notebooks was failing on file systems with unicode
    normalization different from the encoding used in the strings. In
    particular on macOS with HFS+ I got failures for four of the file names.
    This is because HFS+ uses normalization form D while normalization form
    C is more commonly used, especially on Linux.
    
    By normalizing the name and path read from disk to NFC we avoid the
    mismatch as long as no NFD strings are added to the `dirs` tuples.
    There are other unicode normal forms and normalization is not
    necessarily invertible so this is not a perfect solution.
    
    I can think of two alternative solutions:
    
    1. Refrain from using any unicode symbols that have different
       representations in the various normal forms.
    2. Write temporary files to disk somewhere, the read back the paths and
       filenames and use those instead of the original strings in the test.
    toonn committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    345e26c View commit details
    Browse the repository at this point in the history