Skip to content

Commit 6142d6e

Browse files
committed
debugging
1 parent 01fa8a9 commit 6142d6e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
steps:
101101
- uses: actions/checkout@v4
102102
with:
103-
fetch-depth: 0 # required for hatch version discovery, which is needed for numcodecs
103+
fetch-depth: 0 # required for hatch version discovery, which is needed for numcodecs.zarr3
104104
- name: Set up Python
105105
uses: actions/setup-python@v5
106106
with:

docs/user-guide/arrays.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Creating an array
1414
Zarr has several functions for creating arrays. For example::
1515

1616
>>> import zarr
17-
>>> raise Exception(f"Zarr version {zarr.__version__}") # debugging
1817
>>> store = zarr.storage.MemoryStore()
1918
>>> z = zarr.create_array(store=store, shape=(10000, 10000), chunks=(1000, 1000), dtype='int32')
2019
>>> z

src/zarr/core/_tree.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ def __init__(self, tree: rich.tree.Tree) -> None:
2525
self._tree = tree
2626

2727
def __repr__(self) -> str:
28-
terminal = rich.get_console()
29-
# Mocking 'truecolor' color system for tests
30-
color_system = "truecolor" if "PYTEST_VERSION" in os.environ else terminal.color_system
28+
color_system = os.environ.get("OVERRIDE_COLOR_SYSTEM", rich.get_console().color_system)
3129
console = rich.console.Console(file=io.StringIO(), color_system=color_system)
3230
console.print(self._tree)
3331
return str(console.file.getvalue())

tests/test_tree.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import textwrap
23
from typing import Any
34

@@ -10,6 +11,8 @@
1011

1112
@pytest.mark.parametrize("root_name", [None, "root"])
1213
def test_tree(root_name: Any) -> None:
14+
os.environ["OVERRIDE_COLOR_SYSTEM"] = "truecolor"
15+
1316
g = zarr.group(path=root_name)
1417
A = g.create_group("A")
1518
B = g.create_group("B")

0 commit comments

Comments
 (0)