Skip to content

Commit 9107a75

Browse files
committed
add test for inf float value on Tag class
1 parent 1804bcf commit 9107a75

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Fixed
11+
12+
- handle `inf` float values ([@lucventurini](https://github.com/lucventurini))
13+
814
## [0.1.1] - 2020-05-16
915

1016
### Added
@@ -15,5 +21,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1521

1622
- Don't rely on `poetry` to get version.
1723

18-
24+
[Unreleased]: https://github.com/snakemake/snakefmt/compare/0.1.1...HEAD
1925
[0.1.1]: https://github.com/mbhall88/pafpy/compare/0.1.0...0.1.1

tests/test_tag.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,14 @@ def test_tag_with_float_value_parsed(self):
114114
expected = Tag(tag, tag_type, value)
115115

116116
assert actual == expected
117+
118+
def test_tag_with_inf_float_value_parsed(self):
119+
tag = "de"
120+
tag_type = "f"
121+
value = "inf"
122+
string = ":".join([tag, tag_type, str(value)])
123+
124+
actual = Tag.from_str(string)
125+
expected = Tag(tag, tag_type, float(value))
126+
127+
assert actual == expected

0 commit comments

Comments
 (0)