Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork941
Commit5ad7cb2
committed
Start work on making refresh tests restore state
+ Test a successful refresh with a relative path, which will be safer to do once the refresh tests restore changed state.See#1811. This addresses it incompletely, because while it isprobably not necessary while running the test suite to preserve anold False value of git.GIT_OK (most tests can't work if thathappens anyway), the value of Git.GIT_PYTHON_GIT_EXECUTABLE is notthe only other global state that effects the behavior ofsubsequently run tests and that may be changed as a result of therefresh tests.1. After the git.refresh function calls git.cmd.Git.refresh, it calls git.remote.FetchInfo.refresh, which rebinds the git.remote.FetchInfo._flag_map attribute.2. Future changes to git.cmd.Git.refresh may mutate other state in the Git class, and ideally the coupling would be loose enough that the refresh tests wouldn't have to be updated for that if the behavior being tested does not change.3. Future changes to git.refresh may perform other refreshing actions, and ideally it would be easy (and obvious) what has to be done to patch it back. In particular, it will likely call another Git method that mutates class-wide state due to#1791, and for such state that is also of the Git class, ideally no further changes would have to be made to the code that restores state after the refresh tests.If we assume git.refresh is working at least in the case that it iscalled with no arguments, then the cleanup can just be a call togit.refresh(). Otherwise, sufficiently general cleanup may be morecomplicated.1 parent3a34dee commit5ad7cb2
1 file changed
+33
-8
lines changedLines changed: 33 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
47 | 56 |
| |
48 | 57 |
| |
49 | 58 |
| |
| |||
309 | 318 |
| |
310 | 319 |
| |
311 | 320 |
| |
312 |
| - | |
313 |
| - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
314 | 326 |
| |
315 | 327 |
| |
316 |
| - | |
317 |
| - | |
| 328 | + | |
318 | 329 |
| |
319 |
| - | |
320 |
| - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
321 | 335 |
| |
322 | 336 |
| |
323 | 337 |
| |
324 |
| - | |
325 |
| - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
326 | 351 |
| |
327 | 352 |
| |
328 | 353 |
| |
|
0 commit comments
Comments
(0)