Skip to content

Commit 245bf10

Browse files
committed
Add simple non-string examples to format tests
Simply add `object()` instances as non-string test data. This improves test coverage by exercising the failure path for non-string data.
1 parent e31b55f commit 245bf10

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

tests/unit/formats/test_rfc3339.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def test_simple_positive_cases(datestr):
2222
@pytest.mark.parametrize(
2323
"datestr",
2424
(
25+
object(),
2526
"2018-12-31T23:59:59",
2627
"2018-12-31T23:59:59+00:00Z",
2728
"2018-12-31 23:59:59",

tests/unit/formats/test_time.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def test_simple_positive_cases(timestr):
2121
@pytest.mark.parametrize(
2222
"timestr",
2323
(
24+
object(),
2425
"12:34:56",
2526
"23:59:60Z",
2627
"23:59:59+24:00",

0 commit comments

Comments
 (0)