-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93b1610
commit fb3ffed
Showing
8 changed files
with
20 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
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
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
def parse_fixture(file_path): | ||
with open(file_path) as file: | ||
return file.read().strip() | ||
return file.read().strip() |
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 |
---|---|---|
@@ -1,18 +1,23 @@ | ||
from gendiff.formatters.format_determinant import get_data_format_plain | ||
|
||
|
||
def test_get_data_format_plain_dict(): | ||
assert get_data_format_plain({"key": "value"}) == '[complex value]' | ||
assert get_data_format_plain({"key": "value"}) == '[complex value]' | ||
|
||
|
||
def test_get_data_format_plain_bool(): | ||
assert get_data_format_plain(True) == 'true' | ||
assert get_data_format_plain(False) == 'false' | ||
|
||
|
||
def test_get_data_format_plain_string(): | ||
assert get_data_format_plain("hello") == "'hello'" | ||
|
||
|
||
def test_get_data_format_plain_none(): | ||
assert get_data_format_plain(None) == 'null' | ||
|
||
|
||
def test_get_data_format_plain_other_types(): | ||
assert get_data_format_plain(123) == '123' | ||
assert get_data_format_plain(12.3) == '12.3' | ||
assert get_data_format_plain(12.3) == '12.3' |
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
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
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
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