Commit 487a4fd
committed
Add a test for git.index.util.TemporaryFileSwap
This is a general test for TemporaryFileSwap, but by being
parametrized by the type of file_path, it reveals a regression
introduced in 9e86053 (gitpython-developers#1770). TemporaryFileSwap still works when
file_path is a string, but is now broken when it is a Path. That
worked before, and the type annotations document that it should
be able to work. This is at least a bug because TemporaryFileSwap
is public. (I am unsure whether, in practice, GitPython itself uses
it in a way that sometimes passes a Path object as file_path. But
code that uses GitPython may call it directly and pass Path.)1 parent 4023f28 commit 487a4fd
1 file changed
+24
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | | - | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
1087 | 1088 | | |
1088 | 1089 | | |
1089 | 1090 | | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
0 commit comments