-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test expected behavior on whitespace-only input
This commit introduces two tests and modifies other two tests. The introduced tests verify the expected behaviour on files containing a single newline character via 1) `format_str` and 2) `format_file_in_place`. In the other hand, the first modified test (`test_format_file_contents`) verify that `NothingChanged` is raised on files containing only a single newline, and that whitespace-only files are properly formatted to a single newline character. The second modified test (`test_reformat_one_with_stdin_empty`) validates the expected behavior when the input is passed via stdin. Before the fix introduced in the previous commit, these tests (and a couple of others) failed on cases covering whitespace-only files. Now, these tests are passed for all cases. Signed-off-by: Antonio Ossa Guerra <[email protected]>
- Loading branch information
Showing
2 changed files
with
76 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
|
||
|
||
|
||
|
||
# output |
This file contains 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