Handling default django test filename of "tests.py"
diff --git a/pre_commit_hooks/tests_should_end_in_test.py b/pre_commit_hooks/tests_should_end_in_test.py
index 5f4cd08..5f9bbac 100644
--- a/pre_commit_hooks/tests_should_end_in_test.py
+++ b/pre_commit_hooks/tests_should_end_in_test.py
@@ -16,7 +16,7 @@
args = parser.parse_args(argv)
retcode = 0
- test_name_pattern = 'test_.*.py' if args.django else '.*_test.py'
+ test_name_pattern = 'test.*.py' if args.django else '.*_test.py'
for filename in args.filenames:
base = basename(filename)
if (
diff --git a/tests/tests_should_end_in_test_test.py b/tests/tests_should_end_in_test_test.py
index a7aaf52..dc686a5 100644
--- a/tests/tests_should_end_in_test_test.py
+++ b/tests/tests_should_end_in_test_test.py
@@ -12,7 +12,7 @@
def test_validate_files_django_all_pass():
- ret = validate_files(['--django', 'test_foo.py', 'test_bar.py', 'tests/test_baz.py'])
+ ret = validate_files(['--django', 'tests.py', 'test_foo.py', 'test_bar.py', 'tests/test_baz.py'])
assert ret == 0