(self)
| 82 | self.assertIn("АБВ", diffs) |
| 83 | |
| 84 | def test_diffs_detached_head(self): |
| 85 | with GitTemporaryDirectory(): |
| 86 | repo = git.Repo() |
| 87 | fname = Path("foo.txt") |
| 88 | fname.touch() |
| 89 | repo.git.add(str(fname)) |
| 90 | repo.git.commit("-m", "foo") |
| 91 | |
| 92 | fname2 = Path("bar.txt") |
| 93 | fname2.touch() |
| 94 | repo.git.add(str(fname2)) |
| 95 | repo.git.commit("-m", "bar") |
| 96 | |
| 97 | fname3 = Path("baz.txt") |
| 98 | fname3.touch() |
| 99 | repo.git.add(str(fname3)) |
| 100 | repo.git.commit("-m", "baz") |
| 101 | |
| 102 | repo.git.checkout("HEAD^") |
| 103 | |
| 104 | fname.write_text("index\n") |
| 105 | repo.git.add(str(fname)) |
| 106 | |
| 107 | fname2.write_text("workingdir\n") |
| 108 | |
| 109 | git_repo = GitRepo(InputOutput(), None, ".") |
| 110 | diffs = git_repo.get_diffs() |
| 111 | self.assertIn("index", diffs) |
| 112 | self.assertIn("workingdir", diffs) |
| 113 | |
| 114 | def test_diffs_between_commits(self): |
| 115 | with GitTemporaryDirectory(): |
nothing calls this directly
no test coverage detected