From 9262e31316a16180044e0e28a2740238f8aef5c4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 19 Jun 2022 09:03:36 +0200 Subject: Merging upstream version 4.3.0. Signed-off-by: Daniel Baumann --- tests/tests_should_end_in_test_test.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/tests_should_end_in_test_test.py') 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 -- cgit v1.2.3