From 6f5e4dd2d1a4a8ab157a39fd44fea655a353b861 Mon Sep 17 00:00:00 2001 From: William Ting Date: Wed, 1 Jan 2014 22:00:24 -0600 Subject: [PATCH] fix helper function unit tests --- tests/autojump_utils_test.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/autojump_utils_test.py b/tests/autojump_utils_test.py index 0eeb00e..100713f 100644 --- a/tests/autojump_utils_test.py +++ b/tests/autojump_utils_test.py @@ -154,7 +154,7 @@ class FileSystemIntegrationTests(TestCase): assert_true(os.path.exists(dst)) -def HelperFunctionsUnitTests(TestCase): +class HelperFunctionsUnitTests(TestCase): def test_get_needle(self): assert_equal( get_tab_entry_info('foo__', '__'), @@ -167,8 +167,13 @@ def HelperFunctionsUnitTests(TestCase): def test_get_path(self): assert_equal( - get_tab_entry_info('foo__3__/foo', '__'), - ('foo', 3, '/foo')) + get_tab_entry_info('foo__3__/foo/bar', '__'), + ('foo', 3, '/foo/bar')) + + def test_get_none(self): + assert_equal( + get_tab_entry_info('gibberish content', '__'), + (None, None, None)) if __name__ == "__main__":