Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork938
Commitac50d8e
committed
Change warning refresh-mode tests to expect logging
This is instead of the current behavior writing the message tostdout.This commit does not change the behavior of the code under test,but it changes tests to assert the following:- "Bad git executable" messages are logged, at level CRITICAL.- "log" (and "l") is recognized as another synonym of "warn".- "silent" is recognized as a synonym of "quiet" (as "silence" is).Although it is ambiguous whether this should be logged at levelERROR or CRITICAL, because git.refresh is still expected to beusable and can be called manually, not having a working git is acondition in which GitPython, and any program that really relies onits functionality, should be expected not work. That is the generalrationale for using CRIICAL here. There are also two specificreasons:- Existing messages GitPython logs as ERROR typically represent errors in individual operations on repositories, which could fail without indicating that GitPython's overall functionality is in an unusable state. Using the higher CRITICAL level for this situation makes sense for contrast.- Prior to#1813, logging messsges emitted from GitPython modules, no matter the level, were suppressed when logging was not configured, but because this message was printed instead of being logged, it was still shown. Now that it is to be logged, there may be a benefit to have an easy way for someone to bring back a close approximation of the old behavior. Having this message be at a higher logging level makes that easier to do. (This is a less important reason, as that should rarely be done.)test_initial_refresh_from_bad_git_path_env_warn is the main changedtest. All tests should pass again once code is changed for#1808.1 parent147e80b commitac50d8e
1 file changed
+7
-6
lines changedLines changed: 7 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
10 | 9 |
| |
11 | 10 |
| |
12 | 11 |
| |
| |||
333 | 332 |
| |
334 | 333 |
| |
335 | 334 |
| |
336 |
| - | |
| 335 | + | |
337 | 336 |
| |
338 | 337 |
| |
339 | 338 |
| |
| |||
348 | 347 |
| |
349 | 348 |
| |
350 | 349 |
| |
351 |
| - | |
| 350 | + | |
352 | 351 |
| |
353 |
| - | |
| 352 | + | |
354 | 353 |
| |
355 | 354 |
| |
356 | 355 |
| |
| |||
360 | 359 |
| |
361 | 360 |
| |
362 | 361 |
| |
363 |
| - | |
| 362 | + | |
364 | 363 |
| |
365 |
| - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
366 | 367 |
| |
367 | 368 |
| |
368 | 369 |
| |
|
0 commit comments
Comments
(0)