Skip to content

Commit

Permalink
possible windows fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mavaylon1 committed Oct 30, 2024
1 parent 2ee7173 commit 87dbe90
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/unit/base_tests_zarrio.py
Original file line number Diff line number Diff line change
Expand Up @@ -1256,12 +1256,13 @@ def test_attr_reference(self):
export_io.export(src_io=read_io)
with ZarrIO(self.store[1], manager=get_foo_buildmanager(), mode='r') as read_io:
read_foofile2 = read_io.read()
expected = ZarrIO.get_zarr_paths(read_foofile2.foo_ref_attr.my_data)
if isinstance(self.store[1], str):
self.assertTupleEqual(ZarrIO.get_zarr_paths(read_foofile2.foo_ref_attr.my_data, True),
(self.store[1], '/buckets/bucket1/foo_holder/foo1/my_data'))
self.assertTupleEqual((os.path.normpath(expected[0]), expected[1]),
(os.path.normpath(self.store[1]), '/buckets/bucket1/foo_holder/foo1/my_data'))
else:
self.assertTupleEqual(ZarrIO.get_zarr_paths(read_foofile2.foo_ref_attr.my_data),
(self.store[1].path, '/buckets/bucket1/foo_holder/foo1/my_data'))
self.assertTupleEqual((os.path.normpath(expected[0]), expected[1]),
(os.path.normpath(self.store[1].path), '/buckets/bucket1/foo_holder/foo1/my_data'))
# make sure the attribute reference resolves to the container within the same file
self.assertIs(read_foofile2.foo_ref_attr, read_foofile2.buckets['bucket1'].foos['foo1'])

Expand Down

0 comments on commit 87dbe90

Please sign in to comment.