-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jan Bielecki
committed
Jun 12, 2024
1 parent
0e7f795
commit eea44fd
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |