(self)
| 37 | self.assertIn("workingdir", diffs) |
| 38 | |
| 39 | def test_diffs_nonempty_repo(self): |
| 40 | with GitTemporaryDirectory(): |
| 41 | repo = git.Repo() |
| 42 | fname = Path("foo.txt") |
| 43 | fname.touch() |
| 44 | repo.git.add(str(fname)) |
| 45 | |
| 46 | fname2 = Path("bar.txt") |
| 47 | fname2.touch() |
| 48 | repo.git.add(str(fname2)) |
| 49 | |
| 50 | repo.git.commit("-m", "initial") |
| 51 | |
| 52 | fname.write_text("index\n") |
| 53 | repo.git.add(str(fname)) |
| 54 | |
| 55 | fname2.write_text("workingdir\n") |
| 56 | |
| 57 | git_repo = GitRepo(InputOutput(), None, ".") |
| 58 | diffs = git_repo.get_diffs() |
| 59 | self.assertIn("index", diffs) |
| 60 | self.assertIn("workingdir", diffs) |
| 61 | |
| 62 | def test_diffs_with_single_byte_encoding(self): |
| 63 | with GitTemporaryDirectory(): |
nothing calls this directly
no test coverage detected