Repository navigation
Make the CLI and its tests behave the same on Windows - #5
Merged
Merged
Conversation
…g command - diff read the installed copy as text and the registry's as bytes, so a spec with CRLF line endings showed every line as changed against itself, on any system. Both sides are bytes now. - The files of a registry (index.yml, metadata.yml, a new spec) are written with LF on every system: a maintainer signs the bytes of index.yml, and text mode would make them CRLF on Windows. - The messages that name a path in the registry (created, forked, kept, wrote doi) use / on every system. - A target whose command cannot be started is an error verdict, as it already was behind the POSIX limits wrapper (exit status 127), and not an exception that stops the evaluation on Windows.
…hs, the Windows home The fixtures write spec files byte for byte (the tests hash them), the expected paths of the fake Fandango and of the site are compared with /, the home directory is set for USERPROFILE as well as HOME, and the placeholder test no longer puts a path into Python source, where a backslash is an escape.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first run of
tests.ymlon GitHub failed 16 tests on Windows (868 passed); Linux, macOS and the type check passed. Most were tests that assumed/or a POSIX home directory, but three were real behaviour of the package.The package
fanbase diffread the installed copy as text and the registry's copy as bytes. Python turns CRLF into LF when it reads text, so a spec with CRLF line endings showed every line as changed against itself. This happened on any system, and Windows only made it show. Both sides are bytes now.errorverdict, as it already was on POSIX (behind the limits wrapper it is exit status 127). On Windows it was an exception that stopped the evaluation of everything.index.yml,metadata.yml, a new spec) are written with LF on every system. A maintainer signs the bytes ofindex.yml, and writing it in text mode on Windows makes it CRLF. The messages that name a path in the registry (created,forked,kept,wrote doi) use/everywhere.The tests
/, the fake home is set forUSERPROFILEas well asHOME, and the placeholder test no longer puts a path into Python source (a backslash is an escape there).diffof a CRLF spec, a registry's files have no CR, and a command that cannot be started.How was it tested?
macOS: 958 passed, 1 skipped, and
mypy srcis clean. I cannot run Windows myself: this pull request'stestsjobs are the check, and if some fail I will push more commits here rather than guess.