Skip to content

test: quote and clean up temporary flagfile paths - #79

Open
Shubham-Padkonde wants to merge 1 commit into
google:masterfrom
Shubham-Padkonde:test/portable-flagfile-path
Open

Shubham-Padkonde wants to merge 1 commit into
google:masterfrom
Shubham-Padkonde:test/portable-flagfile-path

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

ConfigDictFlagTest.testFlagfile fails on Windows because _parse_flags uses shlex.split, which consumes backslashes in the unquoted temporary filename. The same command breaks when the temporary directory contains spaces. The test also leaves its delete=False file behind.

Quote the filename for the test command and use a temporary directory that cleans up the file. Give that directory a space-containing prefix so the test exercises the quoting requirement on other platforms too. The file is closed before parsing.

Validation: reproduced the original failure on unchanged upstream on Windows. Config-dict and config-flags suites now pass without deselecting that test: 386 passed, 8 subtests passed, 1 skipped. git diff --check passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant