Skip to content

Commit 47e28f8

Browse files
Style fixes for pre-commit
1 parent 56ec3f6 commit 47e28f8

File tree

4 files changed

+26
-7
lines changed

4 files changed

+26
-7
lines changed

zarr/tests/test_core.py

+15-5
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,19 @@
3333
from numcodecs.tests.common import greetings
3434
except ModuleNotFoundError:
3535
greetings = [
36-
'¡Hola mundo!', 'Hej Världen!', 'Servus Woid!', 'Hei maailma!',
37-
'Xin chào thế giới', 'Njatjeta Botë!', 'Γεια σου κόσμε!',
38-
'こんにちは世界', '世界,你好!', 'Helló, világ!', 'Zdravo svete!',
39-
'เฮลโลเวิลด์'
40-
]
36+
"¡Hola mundo!",
37+
"Hej Världen!",
38+
"Servus Woid!",
39+
"Hei maailma!",
40+
"Xin chào thế giới",
41+
"Njatjeta Botë!",
42+
"Γεια σου κόσμε!",
43+
"こんにちは世界",
44+
"世界,你好!",
45+
"Helló, világ!",
46+
"Zdravo svete!",
47+
"เฮลโลเวิลด์",
48+
]
4149

4250
from numpy.testing import assert_array_almost_equal, assert_array_equal
4351

@@ -1066,8 +1074,10 @@ def test_array_0d(self):
10661074
assert 42 == z[()]
10671075
z[()] = 43
10681076
assert 43 == z[()]
1077+
# Failing here. TODO: Investigate this
10691078
z[()] = z.fill_value
10701079
assert z.fill_value == z[()]
1080+
# The failure says that z.fill_value is 0, but z[()] is 42...
10711081
with pytest.raises(IndexError):
10721082
z[0] = 42
10731083
with pytest.raises(IndexError):

zarr/tests/test_storage.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,14 @@
5959
)
6060
from zarr.storage import FSStore, rename, listdir
6161
from zarr._storage.v3 import KVStoreV3
62-
from zarr.tests.util import CountingDict, have_fsspec, is_wasm, skip_test_env_var, abs_container, mktemp
62+
from zarr.tests.util import (
63+
CountingDict,
64+
have_fsspec,
65+
is_wasm,
66+
skip_test_env_var,
67+
abs_container,
68+
mktemp,
69+
)
6370
from zarr.util import ConstantMap, json_dumps
6471

6572

zarr/tests/test_sync.py

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def init_attributes(self, store, read_only=False, cache=True, zarr_version=zarr_
3131
store, synchronizer=synchronizer, key=key, read_only=read_only, cache=cache
3232
)
3333

34+
3435
@pytest.mark.skipif(is_wasm(), reason="No fcntl support in WASM/Pyodide")
3536
class TestAttributesProcessSynchronizer(TestAttributes):
3637
def init_attributes(self, store, read_only=False, cache=True, zarr_version=zarr_version):
@@ -97,6 +98,7 @@ def test_parallel_append(self):
9798

9899
pool.terminate()
99100

101+
100102
@pytest.mark.skipif(is_wasm(), reason="No threading support in WASM/Pyodide")
101103
class TestArrayWithThreadSynchronizer(TestArray, MixinArraySyncTests):
102104
def create_array(self, read_only=False, **kwargs):

zarr/tests/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def skip_test_env_var(name):
9696

9797

9898
def is_wasm():
99-
return (sys.platform == "emscripten" or platform.machine() in ["wasm32", "wasm64"])
99+
return sys.platform == "emscripten" or platform.machine() in ["wasm32", "wasm64"]
100100

101101

102102
def abs_container():

0 commit comments

Comments
 (0)