Skip to content

Commit 1d87d49

Browse files
Replace redundant list comprehension with generator
1 parent 0465c2b commit 1d87d49

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

tests/test_group.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,12 +1641,10 @@ async def test_create_hierarchy_existing_nodes(
16411641
elif impl == "async":
16421642
with pytest.raises(err_cls, match=re.escape(msg)):
16431643
tuple(
1644-
[
1645-
x
1646-
async for x in create_hierarchy(
1647-
store=store, nodes={"node": new_metadata}, overwrite=False
1648-
)
1649-
]
1644+
x
1645+
async for x in create_hierarchy(
1646+
store=store, nodes={"node": new_metadata}, overwrite=False
1647+
)
16501648
)
16511649
else:
16521650
raise ValueError(f"Invalid impl: {impl}")

tests/test_store/test_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def test_valid() -> None:
197197
Test that path normalization works as expected
198198
"""
199199
paths = ["a", "b", "c", "d", "", "//a///b//"]
200-
assert _normalize_paths(paths) == tuple([normalize_path(p) for p in paths])
200+
assert _normalize_paths(paths) == tuple(normalize_path(p) for p in paths)
201201

202202
@staticmethod
203203
@pytest.mark.parametrize("paths", [("", "/"), ("///a", "a")])

0 commit comments

Comments
 (0)