(self)
| 798 | self.assertIn("file.txt", diff) |
| 799 | |
| 800 | def test_skip_aiderignored_files(self): |
| 801 | with GitTemporaryDirectory(): |
| 802 | repo = git.Repo() |
| 803 | |
| 804 | fname1 = "ignoreme1.txt" |
| 805 | fname2 = "ignoreme2.txt" |
| 806 | fname3 = "dir/ignoreme3.txt" |
| 807 | |
| 808 | Path(fname2).touch() |
| 809 | repo.git.add(str(fname2)) |
| 810 | repo.git.commit("-m", "initial") |
| 811 | |
| 812 | io = InputOutput(yes=True) |
| 813 | |
| 814 | fnames = [fname1, fname2, fname3] |
| 815 | |
| 816 | aignore = Path(".aiderignore") |
| 817 | aignore.write_text(f"{fname1}\n{fname2}\ndir\n") |
| 818 | repo = GitRepo( |
| 819 | io, |
| 820 | fnames, |
| 821 | None, |
| 822 | aider_ignore_file=str(aignore), |
| 823 | ) |
| 824 | |
| 825 | coder = Coder.create( |
| 826 | self.GPT35, |
| 827 | None, |
| 828 | io, |
| 829 | fnames=fnames, |
| 830 | repo=repo, |
| 831 | ) |
| 832 | |
| 833 | self.assertNotIn(fname1, str(coder.abs_fnames)) |
| 834 | self.assertNotIn(fname2, str(coder.abs_fnames)) |
| 835 | self.assertNotIn(fname3, str(coder.abs_fnames)) |
| 836 | |
| 837 | def test_skip_gitignored_files_on_init(self): |
| 838 | with GitTemporaryDirectory() as _: |
nothing calls this directly
no test coverage detected