Skip to content

Commit 7a2c158

Browse files
committed
style: apply ruff-format (collapse multi-line asserts where they fit)
1 parent 237791e commit 7a2c158

3 files changed

Lines changed: 7 additions & 20 deletions

File tree

tests/integration/test_dependencies.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ def test_load_all_downstream_short_circuits_on_repeat(self, thing_tables):
8282
assert conn.dependencies._loaded_schemas, "warm-up must populate _loaded_schemas"
8383

8484
# Second identical call must hit the early-return: no load(), no rebuild.
85-
with patch.object(
86-
type(conn.dependencies), "load", wraps=conn.dependencies.load
87-
) as spy_load:
85+
with patch.object(type(conn.dependencies), "load", wraps=conn.dependencies.load) as spy_load:
8886
conn.dependencies.load_all_downstream()
8987
assert spy_load.call_count == 0, (
9088
"load_all_downstream must short-circuit when _loaded_schemas already "
@@ -101,9 +99,7 @@ def test_load_all_upstream_short_circuits_on_repeat(self, thing_tables):
10199
assert conn.dependencies._loaded is True
102100
assert conn.dependencies._loaded_schemas
103101

104-
with patch.object(
105-
type(conn.dependencies), "load", wraps=conn.dependencies.load
106-
) as spy_load:
102+
with patch.object(type(conn.dependencies), "load", wraps=conn.dependencies.load) as spy_load:
107103
conn.dependencies.load_all_upstream()
108104
assert spy_load.call_count == 0, (
109105
"load_all_upstream must short-circuit when _loaded_schemas already "

tests/integration/test_gc.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -904,9 +904,7 @@ def test_pruning_removes_empty_pk_directory(self, schema_prune):
904904
assert stats["schema_paths_deleted"] >= 1
905905

906906
# The orphaned file is gone.
907-
assert not (store_root / dead_ref).exists(), (
908-
f"orphaned schema file must be deleted; still present at {dead_ref}"
909-
)
907+
assert not (store_root / dead_ref).exists(), f"orphaned schema file must be deleted; still present at {dead_ref}"
910908
# The pruning loop must have removed the now-empty pk-dir.
911909
dead_pk_dir = (store_root / dead_ref).parent
912910
assert not dead_pk_dir.exists(), (
@@ -917,18 +915,12 @@ def test_pruning_removes_empty_pk_directory(self, schema_prune):
917915

918916
# The sibling pk-dir with a live file must be preserved.
919917
live_pk_dir = (store_root / live_ref).parent
920-
assert live_pk_dir.exists(), (
921-
f"pk-directory holding a live file must not be pruned; missing {live_pk_dir}"
922-
)
923-
assert (store_root / live_ref).exists(), (
924-
f"live schema file must survive collect(); missing {live_ref}"
925-
)
918+
assert live_pk_dir.exists(), f"pk-directory holding a live file must not be pruned; missing {live_pk_dir}"
919+
assert (store_root / live_ref).exists(), f"live schema file must survive collect(); missing {live_ref}"
926920

927921
# The table directory (grandparent) still holds live content, so it
928922
# must be preserved — the pruning walk must stop at "not empty".
929-
assert live_pk_dir.parent.exists(), (
930-
"table directory must survive when it still holds a live pk-dir"
931-
)
923+
assert live_pk_dir.parent.exists(), "table directory must survive when it still holds a live pk-dir"
932924

933925
def test_pruning_stops_at_store_root(self, schema_prune):
934926
"""After removing the last orphan under a schema, the pruning walk may

tests/integration/test_object.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ def test_build_object_path_empty_schema_prefix(self):
157157
# Regression sentinel: deleting the ``if prefix:`` guard would produce
158158
# a leading empty segment, i.e. ``"/myschema/..."``.
159159
assert not path.startswith("/"), (
160-
f"path must not have a leading empty segment when schema_prefix is empty; "
161-
f"got {path!r}"
160+
f"path must not have a leading empty segment when schema_prefix is empty; " f"got {path!r}"
162161
)
163162

164163
def test_build_object_path_empty_schema_prefix_with_partition(self):

0 commit comments

Comments
 (0)