From c217c693b3fbf022f3a5be956df74f7c360d29d9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 20:05:33 +0200 Subject: Merging upstream version 3.7.0. Signed-off-by: Daniel Baumann --- tests/commands/run_test.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/commands') diff --git a/tests/commands/run_test.py b/tests/commands/run_test.py index e36a3ca..50a20f3 100644 --- a/tests/commands/run_test.py +++ b/tests/commands/run_test.py @@ -1088,6 +1088,22 @@ def test_fail_fast_per_hook(cap_out, store, repo_with_failing_hook): assert printed.count(b'Failing hook') == 1 +def test_fail_fast_not_prev_failures(cap_out, store, repo_with_failing_hook): + with modify_config() as config: + config['repos'].append({ + 'repo': 'meta', + 'hooks': [ + {'id': 'identity', 'fail_fast': True}, + {'id': 'identity', 'name': 'run me!'}, + ], + }) + stage_a_file() + + ret, printed = _do_run(cap_out, store, repo_with_failing_hook, run_opts()) + # should still run the last hook since the `fail_fast` one didn't fail + assert printed.count(b'run me!') == 1 + + def test_classifier_removes_dne(): classifier = Classifier(('this_file_does_not_exist',)) assert classifier.filenames == [] -- cgit v1.2.3