Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Bielecki committed Jun 12, 2024
1 parent 0e7f795 commit eea44fd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pdtable/test/io/parsers/test_blocks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from pdtable.io.parsers.blocks import _safe_strip


class TestSafeStrip:
def test_string_input(self) -> None:
assert _safe_strip(" hello ") == "hello"

def test_int_input(self) -> None:
assert _safe_strip(123) == "123"

def test_string_input_with_leading_trailing_spaces(self) -> None:
assert _safe_strip(" hello world ") == "hello world"

def test_int_input_with_leading_trailing_spaces(self) -> None:
assert _safe_strip(" 123 ") == "123"

0 comments on commit eea44fd

Please sign in to comment.