Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Commit5b2771d
committed
Add regression tests of the git.util aliasing situation
Although this situation is not inherently desirable, for backwardcompatibility it cannot change at this time. It may be possible tochange it in the next major version of GitPython, but even then itshould not be changed accidentally, which can easily happen whilerefactoring imports.This tests the highest-risk accidental change (of those that arecurrently known) of the kind that the temporary modattrs.py scriptexists to help safeguard against. That script will be removed whenthe immediately forthcoming import refactoring is complete, whereasthese test cases can be kept.For information about the specific situation this helps ensureisn't changed accidentally, see the new test cases' docstrings, aswell as the next commit (which will test modattrs.py and these testcases by performing an incomplete change that would be a bug untilcompleted).This commit adds three test cases. The first tests the unintuitiveaspect of the current situation:- test_git_util_attribute_is_git_index_utilThe other two test the intuitive aspects of it, i.e., they testthat changes (perhaps in an attempt to preserve the aspect neededfor backward compatibility) do not make `git.util` unusual in new(and themselves incompatible) ways:- test_git_index_util_attribute_is_git_index_util- test_separate_git_util_module_existsThe latter tests should also clarify, for readers of the tests, thelimited nature of the condition the first test asserts.1 parent1e5a944 commit5b2771d
1 file changed
+32
-0
lines changedLines changed: 32 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + |
0 commit comments
Comments
(0)