def test_tag_present(self): expected = Tag.from_str("de:f:0.1") tags = {"de": expected} record = PafRecord(tags=tags) tag = "de" actual = record.get_tag(tag) assert actual == expected
def test_tag_not_present_returns_default(self): tags = {"de": Tag.from_str("de:f:0.1")} record = PafRecord(tags=tags) tag = "NM" default = Tag.from_str("NM:i:0") actual = record.get_tag(tag, default=default) expected = default assert actual == expected