-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into Derra_Branch
- Loading branch information
Showing
2 changed files
with
40 additions
and
1 deletion.
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
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,38 @@ | ||
from nikola.log import configure_logging, print_coverage_configure, reset_coverage_configure, LoggingMode | ||
from unittest.mock import patch | ||
|
||
|
||
def test_normal_mode_debug(): | ||
reset_coverage_configure() | ||
with patch('nikola.log.DEBUG', True): | ||
configure_logging(logging_mode=LoggingMode.NORMAL) | ||
print_coverage_configure() | ||
|
||
|
||
def test_normal_mode_no_debug(): | ||
reset_coverage_configure() | ||
configure_logging(logging_mode=LoggingMode.NORMAL) | ||
print_coverage_configure() | ||
|
||
|
||
def test_quiet_mode_debug(): | ||
reset_coverage_configure() | ||
with patch('nikola.log.DEBUG', True): | ||
configure_logging(logging_mode=LoggingMode.QUIET) | ||
print_coverage_configure() | ||
|
||
def test_quiet_mode_no_debug(): | ||
reset_coverage_configure() | ||
configure_logging(logging_mode=LoggingMode.QUIET) | ||
print_coverage_configure() | ||
|
||
def test_strict_mode_debug(): | ||
reset_coverage_configure() | ||
with patch('nikola.log.DEBUG', True): | ||
configure_logging(logging_mode=LoggingMode.STRICT) | ||
print_coverage_configure() | ||
|
||
def test_strict_mode_no_debug(): | ||
reset_coverage_configure() | ||
configure_logging(logging_mode=LoggingMode.STRICT) | ||
print_coverage_configure() |