Skip to content

Commit

Permalink
#157 Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
roskakori committed Jul 6, 2024
1 parent 73a76f9 commit 1cbd894
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,14 @@ def test_can_convert_multiple_lines():

def test_can_convert_empty_lines():
assert list(pygount.common.lines("\n\n\n")) == ["", "", ""]


def test_can_compute_mapped_repr():
class Dummy:
pass

assert pygount.common.mapped_repr(Dummy(), {}) == "Dummy()"
assert (
pygount.common.mapped_repr(Dummy(), {"some": "such", "other": 1, "whatever": True})
== "Dummy(some=such, other=1, whatever=True)"
)

0 comments on commit 1cbd894

Please sign in to comment.