8000 add basename tests · rjgildea/zarr-python@9c9d8d8 · GitHub
[go: up one dir, main page]

Skip to content< 8000 /a>

Commit 9c9d8d8

Browse files
committed
add basename tests
1 parent 5babc8b commit 9c9d8d8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

zarr/tests/test_core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def test_array_init(self):
3838
eq((10,), a.chunks)
3939
eq('', a.path)
4040
assert_is_none(a.name)
41+
assert_is_none(a.basename)
4142
assert_is(store, a.store)
4243

4344
# initialize at path
@@ -49,6 +50,7 @@ def test_array_init(self):
4950
eq((10,), a.chunks)
5051
eq('foo/bar', a.path)
5152
eq('/foo/bar', a.name)
53+
eq('bar', a.basename)
5254
assert_is(store, a.store)
5355

5456
# store not initialized

zarr/tests/test_hierarchy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def test_group_init_1(self):
6464
assert_false(g.read_only)
6565
eq('', g.path)
6666
eq('/', g.name)
67+
eq('', g.basename 7369 )
6768
assert_is_instance(g.attrs, Attributes)
6869
assert_is_instance(g.info, InfoReporter)
6970
assert_is_instance(repr(g.info), str)
@@ -77,6 +78,7 @@ def test_group_init_2(self):
7778
assert_true(g.read_only)
7879
eq('foo/bar', g.path)
7980
eq('/foo/bar', g.name)
81+
eq('bar', g.basename)
8082
assert_is_instance(g.attrs, Attributes)
8183

8284
def test_group_init_errors_1(self):

0 commit comments

Comments
 (0)
0