Skip to content

Commit 0e93be0

Browse files
committed
change path
1 parent f669379 commit 0e93be0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pre_commit_hooks/tests_should_end_in_test.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def main(argv: Sequence[str] | None = None) -> int:
1414
'--pytest',
1515
dest='pattern',
1616
action='store_const',
17-
const=r'.*/tests_*\.py',
18-
default=r'.*/tests_*\.py',
17+
const=r'tests/.*/tests_*\.py',
18+
default=r'tests/.*/tests_*\.py',
1919
help='(the default) ensure tests match %(const)s',
2020
)
2121
args = parser.parse_args(argv)
@@ -27,9 +27,10 @@ def main(argv: Sequence[str] | None = None) -> int:
2727
print(base)
2828
if (
2929
not reg.fullmatch(base) and
30-
not base == '__init__.py' and
31-
not base == 'conftest.py' and
32-
not base == 'models.py'
30+
not base == '.*/__init__.py' and
31+
not base == '.*/conftest.py' and
32+
not base == '.*/models.py'
33+
3334
):
3435
retcode = 1
3536
print(f'{filename} does not match pattern "{args.pattern}"')

0 commit comments

Comments
 (0)