Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Commit2382891
committed
Test that deprecated Diff.renamed property warns
This starts on a test.deprecation subpackage for deprecation tests.Having these tests in a separate directory inside the test suitemay or may not be how they will ultimately be orgnaized, but it hastwo advantages:- Once all the tests are written, it should be easy to see what in GitPython is deprecated.- Some deprecation warnings -- those on module or class attribute access -- will require the introduction of new dynamic behavior, and thus run the risk of breaking static type checking. So that should be checked for, where applicable. But currently the test suite has no type annotations and is not checked by mypy. Having deprecation-related tests under the same path will make it easier to enable mypy for just this part of the test suite (for now).It is also for this latter reason that the one test so far iswritten without using the GitPython test suite's existing fixtureswhose uses are harder to annotate. This may be changed ifwarranted, though some of the more complex deprecation-relatedtests may benefit from being written as pure pytest tests.Although a number of deprecated features in GitPython do alreadyissue warnings, Diff.renamed is one of the features that does notyet do so. So the newly introduced test will fail until that isfixed in the next commit.1 parent64ec0b1 commit2382891
2 files changed
+22
-0
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + |
Lines changed: 20 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 | + |
0 commit comments
Comments
(0)