diff options
| author | Michael Williamson <mike@zwobble.org> | 2022-11-25 22:50:05 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2022-11-25 22:58:16 +0000 |
| commit | 5093d72b9fece1a7c3d7a3d19e4161387ee6475a (patch) | |
| tree | c4122b0f72c7864897d78333e75328ac8c22685b /tests/zips_tests.py | |
| parent | 20e3e61530bef546058124c3015ae240733cc974 (diff) | |
Use pytest instead of nose
Diffstat (limited to 'tests/zips_tests.py')
| -rw-r--r-- | tests/zips_tests.py | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/tests/zips_tests.py b/tests/zips_tests.py index 8d1505f..b443bcd 100644 --- a/tests/zips_tests.py +++ b/tests/zips_tests.py @@ -1,36 +1,30 @@ -from nose.tools import istest, assert_equal - from mammoth import zips +from .testing import assert_equal -@istest -def split_path_splits_zip_paths_on_last_forward_slash(): +def test_split_path_splits_zip_paths_on_last_forward_slash(): assert_equal(("a", "b"), zips.split_path("a/b")) assert_equal(("a/b", "c"), zips.split_path("a/b/c")) assert_equal(("/a/b", "c"), zips.split_path("/a/b/c")) -@istest -def when_path_has_no_forward_slashes_then_split_path_returns_empty_dirname(): +def test_when_path_has_no_forward_slashes_then_split_path_returns_empty_dirname(): assert_equal(("", "name"), zips.split_path("name")) -@istest -def join_path_joins_arguments_with_forward_slashes(): +def test_join_path_joins_arguments_with_forward_slashes(): assert_equal("a/b", zips.join_path("a", "b")) assert_equal("a/b/c", zips.join_path("a/b", "c")) assert_equal("/a/b/c", zips.join_path("/a/b", "c")) -@istest -def empty_parts_are_ignored_when_joining_paths(): +def test_empty_parts_are_ignored_when_joining_paths(): assert_equal("a", zips.join_path("a", "")) assert_equal("b", zips.join_path("", "b")) assert_equal("a/b", zips.join_path("a", "", "b")) -@istest -def when_joining_paths_then_absolute_paths_ignore_earlier_paths(): +def test_when_joining_paths_then_absolute_paths_ignore_earlier_paths(): assert_equal("/b", zips.join_path("a", "/b")) assert_equal("/b/c", zips.join_path("a", "/b", "c")) assert_equal("/b", zips.join_path("/a", "/b")) |
