-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change default of --fatal command line arg to terminate on error
- Loading branch information
Showing
4 changed files
with
29 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Release type: major | ||
|
||
Change default of `--fatal` command line switch to terminate on error. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import unittest | ||
from unittest.mock import MagicMock, patch | ||
|
||
from pelican import DEFAULT_LOG_HANDLER, main | ||
|
||
|
||
class TestLog(unittest.TestCase): | ||
@patch("pelican.get_instance") | ||
@patch("pelican.init_logging") | ||
def test_main_fatal_default(self, init_logging_mock, get_instance): | ||
get_instance.side_effect = lambda *args, **kwargs: (MagicMock(), MagicMock()) | ||
main() | ||
init_logging_mock.assert_called_once_with( | ||
level=None, | ||
# default is "errors" | ||
fatal="errors", | ||
name="pelican", | ||
handler=DEFAULT_LOG_HANDLER, | ||
logs_dedup_min_level=30, | ||
) |