Skip to content

Commit a77bef7

Browse files
committed
Update error message
1 parent eab70e9 commit a77bef7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from collections import Counter
12
from pathlib import Path
23
from typing import Iterable
34

@@ -6,14 +7,14 @@
67

78
def test_unique_notebook_name():
89
all_notebooks = ROOT.rglob("*.ipynb")
9-
assert _are_all_base_names_unique(all_notebooks)
10+
assert not duplicate_base_names(all_notebooks)
1011

1112

1213
def test_unique_qmod_name():
1314
all_qmods = ROOT.rglob("*.qmod")
14-
assert _are_all_base_names_unique(all_qmods)
15+
assert not duplicate_base_names(all_qmods)
1516

1617

17-
def _are_all_base_names_unique(files: Iterable[Path]) -> bool:
18+
def duplicate_base_names(files: Iterable[Path]) -> bool:
1819
base_names = [f.name for f in files]
19-
return len(base_names) == len(set(base_names))
20+
return [name for name, count in Counter(base_names) if count > 1]

0 commit comments

Comments
 (0)