Skip to content

Commit f669379

Browse files
committed
change path
1 parent d75d74b commit f669379

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

pre_commit_hooks/tests_should_end_in_test.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,17 @@ 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_*\.py',
18+
default=r'.*/tests_*\.py',
1919
help='(the default) ensure tests match %(const)s',
2020
)
21-
mutex.add_argument(
22-
'--pytest-test-first',
23-
dest='pattern',
24-
action='store_const',
25-
const=r'test_.*\.py',
26-
help='ensure tests match %(const)s',
27-
)
28-
mutex.add_argument(
29-
'--django', '--unittest',
30-
dest='pattern',
31-
action='store_const',
32-
const=r'test.*\.py',
33-
help='ensure tests match %(const)s',
34-
)
3521
args = parser.parse_args(argv)
3622

3723
retcode = 0
3824
reg = re.compile(args.pattern)
3925
for filename in args.filenames:
4026
base = os.path.basename(filename)
27+
print(base)
4128
if (
4229
not reg.fullmatch(base) and
4330
not base == '__init__.py' and

0 commit comments

Comments
 (0)