mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 05:45:00 +00:00
fixed test
This commit is contained in:
parent
8dcff175bc
commit
fd6ceb167c
1 changed files with 5 additions and 4 deletions
|
@ -1,18 +1,18 @@
|
||||||
import codecs
|
import codecs
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
|
||||||
import tempfile
|
import tempfile
|
||||||
from io import StringIO
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
from tests.utils import GitTemporaryDirectory
|
|
||||||
|
import git
|
||||||
|
|
||||||
from aider import models
|
from aider import models
|
||||||
from aider.coders import Coder
|
from aider.coders import Coder
|
||||||
from aider.commands import Commands
|
from aider.commands import Commands
|
||||||
from aider.dump import dump # noqa: F401
|
from aider.dump import dump # noqa: F401
|
||||||
from aider.io import InputOutput
|
from aider.io import InputOutput
|
||||||
|
from tests.utils import GitTemporaryDirectory
|
||||||
|
|
||||||
|
|
||||||
class TestCommands(TestCase):
|
class TestCommands(TestCase):
|
||||||
|
@ -169,9 +169,10 @@ class TestCommands(TestCase):
|
||||||
commands = Commands(io, coder)
|
commands = Commands(io, coder)
|
||||||
|
|
||||||
# Run the cmd_git method with the arguments "commit -a -m msg"
|
# Run the cmd_git method with the arguments "commit -a -m msg"
|
||||||
|
commands.cmd_git("add test.txt")
|
||||||
commands.cmd_git("commit -a -m msg")
|
commands.cmd_git("commit -a -m msg")
|
||||||
|
|
||||||
# Check if the file has been committed to the repository
|
# Check if the file has been committed to the repository
|
||||||
repo = git.Repo(tempdir)
|
repo = git.Repo(tempdir)
|
||||||
files_in_repo = [item.a_path for item in repo.index.diff(None)]
|
files_in_repo = repo.git.ls_files()
|
||||||
self.assertIn("test.txt", files_in_repo)
|
self.assertIn("test.txt", files_in_repo)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue