Skip to content

Commit

Permalink
Add test checking parsing of strings interpretable as integers (#32)
Browse files Browse the repository at this point in the history
* Add test checking parsing of strings interpretable as integers.

* Use xfail instead of skip.
  • Loading branch information
rmitsch authored Jun 29, 2023
1 parent 371b97d commit 958bc25
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions confection/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1396,3 +1396,11 @@ def test_warn_single_quotes():
commands = some'thing
"""
cfg = Config().from_str(str_cfg)


@pytest.mark.xfail
def test_parse_strings_interpretable_as_ints():
"""Test whether strings interpretable as integers are parsed correctly (i. e. as strings)."""
cfg = Config().from_str(f"""[a]\nfoo = [${{b.bar}}, "00${{b.bar}}", "y"]\n\n[b]\nbar = 3""")
assert cfg["a"]["foo"] == [3, "003", "y"]
assert cfg["b"]["bar"] == 3

0 comments on commit 958bc25

Please sign in to comment.