mirror of
https://github.com/esphome/esphome.git
synced 2025-08-02 08:27:47 +00:00
adjust test
This commit is contained in:
parent
ba7d5d807d
commit
3b4bb9f739
@ -6,7 +6,7 @@ import json
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from unittest.mock import Mock, patch
|
from unittest.mock import Mock, call, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
@ -308,7 +308,9 @@ def test_should_run_clang_tidy_with_branch() -> None:
|
|||||||
with patch("subprocess.run") as mock_run:
|
with patch("subprocess.run") as mock_run:
|
||||||
mock_run.return_value = Mock(returncode=1) # Hash unchanged
|
mock_run.return_value = Mock(returncode=1) # Hash unchanged
|
||||||
determine_jobs.should_run_clang_tidy("release")
|
determine_jobs.should_run_clang_tidy("release")
|
||||||
mock_changed.assert_called_once_with("release")
|
# Changed files is called twice now - once for hash check, once for .clang-tidy.hash check
|
||||||
|
assert mock_changed.call_count == 2
|
||||||
|
mock_changed.assert_has_calls([call("release"), call("release")])
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user