Skip to content

Commit edbef7d

Browse files
committed
Add docstrings to tests
1 parent 2f801f4 commit edbef7d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/test_strtools.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,29 @@
1111

1212

1313
def test__is_string_like():
14+
"""Test `_is_string_like()`."""
1415
assert _is_string_like("foo") == True
1516
assert _is_string_like(12345) == False
1617

1718

1819
def test_filename_from_string():
20+
"""Test `filename()` using a string."""
1921
assert filename("test_file_name") == "test_file_name"
2022

2123

2224
def test_filename_from_handle(tmpdir):
25+
"""Test `filename()` using a file handle."""
2326
path = str(tmpdir)
2427
fhandle = tmpdir.join("foo.txt")
2528
assert filename(fhandle) == os.path.join(path, "foo.txt")
2629

2730

2831
def test_flatten():
32+
"""Test `flatten()` using a tuple."""
2933
assert flatten(("foo", "bar")) == "foobar"
3034

3135

3236
def test_strip_prefix():
37+
"""Test `strip_prefix()`."""
3338
assert strip_prefix("foobar", "foo") == "bar"
3439
assert strip_prefix("foobar", "bar") == "foobar"

0 commit comments

Comments
 (0)