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

Windows path issues #967

Merged
merged 1 commit into from
Nov 5, 2020
Merged

Windows path issues #967

merged 1 commit into from
Nov 5, 2020

Conversation

JPeterMugaas
Copy link
Contributor

Fix tests to handle paths in Windows. NormalizePath works properly but the tests would still fail because NormalizePath would NOT work as the test results expected. Verified on Windows with command: /mingw64/bin/python -m unittest discover testsuite -v

Results:
`D:\msys64\home\jpmugaas\pycodestyle/pycodestyle.py:124:30: W504 line break after binary operator
D:\msys64\home\jpmugaas\pycodestyle/pycodestyle.py:125:35: W504 line break after binary operator
D:\msys64\home\jpmugaas\pycodestyle/pycodestyle.py:298:46: W504 line break after binary operator
D:\msys64\home\jpmugaas\pycodestyle/pycodestyle.py:394:41: W504 line break after binary operator
D:\msys64\home\jpmugaas\pycodestyle/pycodestyle.py:401:75: W504ok
test_selftest (test_all.PycodestyleTestCase) ... ok
test_check_nullbytes (test_api.APITestCase) ... ok
test_check_unicode (test_api.APITestCase) ... ok
test_register_ast_check (test_api.APITestCase) ... ok
test_register_invalid_check (test_api.APITestCase) ... ok
test_register_logical_check (test_api.APITestCase) ... ok
test_register_physical_check (test_api.APITestCase) ... ok
test_styleguide (test_api.APITestCase) ... ok
test_styleguide_check_files (test_api.APITestCase) ... ok
test_styleguide_checks (test_api.APITestCase) ... ok
test_styleguide_continuation_line_outdented (test_api.APITestCase) ... ok
test_styleguide_excluded (test_api.APITestCase) ... ok
test_styleguide_ignore_code (test_api.APITestCase) ... ok
test_styleguide_init_report (test_api.APITestCase) ... ok
test_styleguide_options (test_api.APITestCase) ... ok
test_styleguide_unmatched_triple_quotes (test_api.APITestCase) ... ok
test_blank_line_between_decorator (test_blank_lines.TestBlankLinesDefault)
It will trigger an error when the decorator is followed by a ... ok
test_blank_line_decorator (test_blank_lines.TestBlankLinesDefault)
It will accept the decorators which are adjacent to the function ... ok
test_initial_lines_more_blank (test_blank_lines.TestBlankLinesDefault)
It will trigger an error for more than 2 blank lines before the ... ok
test_initial_lines_one_blank (test_blank_lines.TestBlankLinesDefault)
It will accept 1 blank lines before the first line of actual ... ok
test_initial_lines_two_blanks (test_blank_lines.TestBlankLinesDefault)
It will accept 2 blank lines before the first line of actual ... ok
test_initial_no_blank (test_blank_lines.TestBlankLinesDefault)
It will accept no blank lines at the start of the file. ... ok
test_method_fewer_follow_lines (test_blank_lines.TestBlankLinesDefault)
It will trigger an error when less than 1 blank line is ... ok
test_method_less_blank_lines (test_blank_lines.TestBlankLinesDefault)
It will trigger an error when less than 1 blank lin is found ... ok
test_method_less_blank_lines_comment (test_blank_lines.TestBlankLinesDefault)
It will trigger an error when less than 1 blank lin is found ... ok
test_method_more_blank_lines (test_blank_lines.TestBlankLinesDefault)
It will trigger an error when more than 1 blank line is found ... ok
test_method_nested_fewer_follow_lines (test_blank_lines.TestBlankLinesDefault)
It will trigger an error when less than 1 blank line is ... ok
test_method_nested_less_class (test_blank_lines.TestBlankLinesDefault)
It will trigger an error when less than 1 blank line is found ... ok
test_method_nested_ok (test_blank_lines.TestBlankLinesDefault)
Will not trigger an error when 1 blank line is found ... ok
test_top_level_fewer_blank_lines (test_blank_lines.TestBlankLinesDefault)
It will trigger an error when less 2 blank lines are found ... ok
test_top_level_fewer_follow_lines (test_blank_lines.TestBlankLinesDefault)
It will trigger an error when less than 2 blank lines are ... ok
test_top_level_fewer_follow_lines_comments (test_blank_lines.TestBlankLinesDefault)
It will trigger an error when less than 2 blank lines are ... ok
test_top_level_good_follow_lines (test_blank_lines.TestBlankLinesDefault)
It not trigger an error when 2 blank lines are ... ok
test_top_level_more_blank_lines (test_blank_lines.TestBlankLinesDefault)
It will trigger an error when more 2 blank lines are found ... ok
test_initial_lines_one_blanks (test_blank_lines.TestBlankLinesTwisted)
It will accept less than 3 blank lines before the first line of ... ok
test_initial_lines_tree_blanks (test_blank_lines.TestBlankLinesTwisted)
It will accept 3 blank lines before the first line of actual ... ok
test_the_right_blanks (test_blank_lines.TestBlankLinesTwisted)
It will accept 3 blank for top level and 2 for nested. ... ok
test_top_level_fewer_blank_lines (test_blank_lines.TestBlankLinesTwisted)
It will trigger an error when less 3 blank lines are found ... ok
test_top_level_more_blank_lines (test_blank_lines.TestBlankLinesTwisted)
It will trigger an error when more 2 blank lines are found ... ok
test_multiline_ignore_parsing (test_parser.ParserTestCase) ... ok
test_multiline_trailing_comma_ignore_parsing (test_parser.ParserTestCase) ... ok
test_trailing_comma_ignore_parsing (test_parser.ParserTestCase) ... ok
test_vanilla_ignore_parsing (test_parser.ParserTestCase) ... ok
test_check_diff (test_shell.ShellTestCase) ... ok
test_check_noarg (test_shell.ShellTestCase) ... ok
test_check_non_existent (test_shell.ShellTestCase) ... ok
test_check_simple (test_shell.ShellTestCase) ... ok
test_check_stdin (test_shell.ShellTestCase) ... ok
test_print_usage (test_shell.ShellTestCase) ... ok
test_normalize_paths (test_util.UtilTestCase) ... ok


Ran 53 tests in 1.255s

OK`

…t the tests would still fail because NormalizePath would NOT work as the test results expected.
Copy link
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

2 participants