Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork938
Commit9277ff5
committed
Avoid another tempdir content assumption in test
test_init was using tempfile.gettempdir() directly to get thelocation where the hard-coded path repos/foo/bar.git would be usedto test repository creation with relative and absolute paths. Thatreused the same location each time, and also assumed the directorywould be usable, which could fail due to previous runs or due tothe path being used separately from GitPython's tests. This commitfixes that by using that path inside a temporary directory, knownat the start of the test to be empty.Reorganizing the acquision and cleanup logic also has had theeffect of causing the test no longer to be skipped due to the logicin git.util.rmtree due to the final cleanup attempt (after allassertions). The directory is now successfully removed on Windows,and the test passes on all platforms.1 parentad570de commit9277ff5
1 file changed
+7
-16
lines changedLines changed: 7 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
44 |
| - | |
| 44 | + | |
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
| |||
511 | 511 |
| |
512 | 512 |
| |
513 | 513 |
| |
514 |
| - | |
515 |
| - | |
516 |
| - | |
517 |
| - | |
518 |
| - | |
519 |
| - | |
520 |
| - | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
521 | 519 |
| |
522 | 520 |
| |
523 | 521 |
| |
| |||
527 | 525 |
| |
528 | 526 |
| |
529 | 527 |
| |
530 |
| - | |
| 528 | + | |
531 | 529 |
| |
532 | 530 |
| |
533 | 531 |
| |
| |||
562 | 560 |
| |
563 | 561 |
| |
564 | 562 |
| |
565 |
| - | |
566 |
| - | |
567 |
| - | |
568 |
| - | |
569 |
| - | |
570 |
| - | |
571 |
| - | |
572 | 563 |
| |
573 | 564 |
| |
574 | 565 |
| |
|
0 commit comments
Comments
(0)