From 83cad3d984ac64046227d46488fcadbc3fc1016c Mon Sep 17 00:00:00 2001 From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch> Date: Mon, 17 Dec 2018 23:04:55 +0100 Subject: [PATCH] Add tests for image_basename() --- tests/test_pathtools.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_pathtools.py b/tests/test_pathtools.py index 0063683..fb81e81 100644 --- a/tests/test_pathtools.py +++ b/tests/test_pathtools.py @@ -4,6 +4,7 @@ import pytest from imcflibs.pathtools import parse_path from imcflibs.pathtools import jython_fiji_exists +from imcflibs.pathtools import image_basename __author__ = "Niko Ehrenfeuchter" __copyright__ = "Niko Ehrenfeuchter" @@ -45,3 +46,9 @@ def test_parse_path_windows(): def test_jython_fiji_exists(tmpdir): assert jython_fiji_exists(str(tmpdir)) == True + + +def test_image_basename(): + assert image_basename('/path/to/image_file_01.png') == 'image_file_01' + assert image_basename('more-complex-stack.ome.tif') == 'more-complex-stack' + assert image_basename('/tmp/FoObAr.OMe.tIf') == 'FoObAr' -- GitLab