mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
style: Remove trailing whitespace in test_main.py
This commit is contained in:
parent
1ec257278e
commit
8679c425e0
1 changed files with 5 additions and 6 deletions
|
@ -927,24 +927,23 @@ class TestMain(TestCase):
|
||||||
repo = git.Repo(git_dir) # Re-open repo to ensure we get fresh config
|
repo = git.Repo(git_dir) # Re-open repo to ensure we get fresh config
|
||||||
self.assertEqual(repo.git.config("user.name"), "Directive User")
|
self.assertEqual(repo.git.config("user.name"), "Directive User")
|
||||||
self.assertEqual(repo.git.config("user.email"), "directive@example.com")
|
self.assertEqual(repo.git.config("user.email"), "directive@example.com")
|
||||||
|
|
||||||
def test_resolve_aiderignore_path(self):
|
def test_resolve_aiderignore_path(self):
|
||||||
# Import the function directly to test it
|
# Import the function directly to test it
|
||||||
from aider.args import resolve_aiderignore_path
|
from aider.args import resolve_aiderignore_path
|
||||||
|
|
||||||
# Test with absolute path
|
# Test with absolute path
|
||||||
abs_path = os.path.abspath("/tmp/test/.aiderignore")
|
abs_path = os.path.abspath("/tmp/test/.aiderignore")
|
||||||
self.assertEqual(resolve_aiderignore_path(abs_path), abs_path)
|
self.assertEqual(resolve_aiderignore_path(abs_path), abs_path)
|
||||||
|
|
||||||
# Test with relative path and git root
|
# Test with relative path and git root
|
||||||
git_root = "/path/to/git/root"
|
git_root = "/path/to/git/root"
|
||||||
rel_path = ".aiderignore"
|
rel_path = ".aiderignore"
|
||||||
expected = os.path.join(git_root, rel_path)
|
expected = os.path.join(git_root, rel_path)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
resolve_aiderignore_path(rel_path, git_root),
|
resolve_aiderignore_path(rel_path, git_root), str(Path(git_root) / rel_path)
|
||||||
str(Path(git_root) / rel_path)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Test with relative path and no git root
|
# Test with relative path and no git root
|
||||||
rel_path = ".aiderignore"
|
rel_path = ".aiderignore"
|
||||||
self.assertEqual(resolve_aiderignore_path(rel_path), rel_path)
|
self.assertEqual(resolve_aiderignore_path(rel_path), rel_path)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue