Skip to content

Commit e2c3a71

Browse files
committed
Add tests docstrings
1 parent 6ef9896 commit e2c3a71

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/test_pathtools.py

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

1212

1313
def test_parse_path():
14+
"""Tests using regular POSIX-style paths."""
1415
path = '/tmp/foo/'
1516
path_to_dir = parse_path(path)
1617
path_to_file = parse_path(path + 'file.ext')
@@ -35,6 +36,7 @@ def test_parse_path():
3536

3637
def test_parse_path_windows():
3738
path = r'C:\foo\bar'
39+
"""Test using a Windows-style path."""
3840
parsed = parse_path(path)
3941

4042
assert parsed['orig'] == path
@@ -44,6 +46,7 @@ def test_parse_path_windows():
4446

4547

4648
def test_parse_path_windows_newline():
49+
"""Test a Windows path with newline and tab sequences as raw string."""
4750
path = r'C:\Temp\new\file.ext'
4851
parsed = parse_path(path)
4952

@@ -73,10 +76,12 @@ def test_parse_path_windows_tabs_and_lines():
7376

7477

7578
def test_jython_fiji_exists(tmpdir):
79+
"""Test the Jython/Fiji `os.path.exists()` workaround."""
7680
assert jython_fiji_exists(str(tmpdir)) == True
7781

7882

7983
def test_image_basename():
84+
"""Test basename extraction for various image file names."""
8085
assert image_basename('/path/to/image_file_01.png') == 'image_file_01'
8186
assert image_basename('more-complex-stack.ome.tif') == 'more-complex-stack'
8287
assert image_basename('/tmp/FoObAr.OMe.tIf') == 'FoObAr'

0 commit comments

Comments
 (0)