summaryrefslogtreecommitdiffstats
path: root/tests/tests_should_end_in_test_test.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-06-19 07:03:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-06-19 07:03:44 +0000
commit9262e31316a16180044e0e28a2740238f8aef5c4 (patch)
tree49b2bc070018965707ec237623da9932c880fae4 /tests/tests_should_end_in_test_test.py
parentAdding debian version 4.1.0-1. (diff)
downloadpre-commit-hooks-9262e31316a16180044e0e28a2740238f8aef5c4.tar.xz
pre-commit-hooks-9262e31316a16180044e0e28a2740238f8aef5c4.zip
Merging upstream version 4.3.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/tests_should_end_in_test_test.py')
-rw-r--r--tests/tests_should_end_in_test_test.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/tests_should_end_in_test_test.py b/tests/tests_should_end_in_test_test.py
index 4df2963..2b5a0de 100644
--- a/tests/tests_should_end_in_test_test.py
+++ b/tests/tests_should_end_in_test_test.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from pre_commit_hooks.tests_should_end_in_test import main
@@ -41,3 +43,8 @@ def test_main_not_django_fails():
def test_main_django_fails():
ret = main(['--django', 'foo_test.py', 'test_bar.py', 'test_baz.py'])
assert ret == 1
+
+
+def test_main_pytest_test_first():
+ assert main(['--pytest-test-first', 'test_foo.py']) == 0
+ assert main(['--pytest-test-first', 'foo_test.py']) == 1