Skip to content

Commit b3205af

Browse files
committed
Fix typo, add more tests
1 parent 63a1573 commit b3205af

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,8 @@ True
378378
False
379379

380380
>>> parse_edtf("2004?-~06-~04")
381-
PartialUncertainOrApproximate: '2004?-~06-~04'>>> L2_PartialUncertainOrApproximate.is_approximate
381+
PartialUncertainOrApproximate: '2004?-~06-~04'
382+
>>> parse_edtf("2004?-~06-~04").is_approximate
382383
True
383384
>>> parse_edtf("2004?-~06-~04").is_uncertain
384385
True

edtf/parser/parser_classes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ def __init__(
866866
all_ua,
867867
]
868868
self.is_uncertain = any(
869-
item.is_uncertain for item in uas if hasattr(item, "is_approximate")
869+
item.is_uncertain for item in uas if hasattr(item, "is_uncertain")
870870
)
871871
self.is_approximate = any(
872872
item.is_approximate for item in uas if hasattr(item, "is_approximate")

edtf/parser/tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@
253253
("1984~/2004-06", (False, True, False)),
254254
("2004-%06", (False, False, True)),
255255
("2004?-~06-~04", (True, True, False)),
256+
("2004?-06-04", (True, False, False)),
256257
("2011-~06-~04", (False, True, False)),
257258
("2004-06-~01/2004-06-~20", (False, True, False)),
258259
("156X~", (False, True, False)),

0 commit comments

Comments
 (0)