mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
test: mock webbrowser.open in git index version test
This commit is contained in:
parent
71a8b286dc
commit
920e8da57c
1 changed files with 3 additions and 1 deletions
|
@ -7,6 +7,7 @@ import pytest
|
|||
from git import GitError, Repo
|
||||
|
||||
from aider import urls
|
||||
import webbrowser
|
||||
from aider.main import sanity_check_repo
|
||||
|
||||
|
||||
|
@ -100,7 +101,8 @@ def test_detached_head_state(create_repo, mock_io):
|
|||
mock_io.tool_output.assert_not_called()
|
||||
|
||||
|
||||
def test_git_index_version_greater_than_2(create_repo, mock_io):
|
||||
@mock.patch('webbrowser.open')
|
||||
def test_git_index_version_greater_than_2(mock_browser, create_repo, mock_io):
|
||||
repo_path, repo = create_repo
|
||||
# Set the git index version to 3
|
||||
set_git_index_version(str(repo_path), 3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue