CliLogTestBase

class lsst.daf.butler.tests.CliLogTestBase

Bases: object

Tests log initialization, reset, and setting log levels.

Methods Summary

runTest(cmd)

Test that the log context manager works with the butler cli to initialize the logging system according to cli inputs for the duration of the command execution and resets the logging system to its previous state or expected state when command execution finishes.

setUp()

testFileLogging()

Test --log-file option.

testLogTty()

Verify that log output to terminal can be suppressed.

testLongLog()

Verify the timestamp is in the log messages when the --long-log flag is set.

test_butlerCliLog()

Test that the log context manager works with the butler cli to initialize the logging system according to cli inputs for the duration of the command execution and resets the logging system to its previous state or expected state when command execution finishes.

test_helpLogReset()

Verify that when a command does not execute, like when the help menu is printed instead, that CliLog is still reset.

Methods Documentation

runTest(cmd: Callable) None

Test that the log context manager works with the butler cli to initialize the logging system according to cli inputs for the duration of the command execution and resets the logging system to its previous state or expected state when command execution finishes.

setUp() None
testFileLogging() None

Test –log-file option.

testLogTty() None

Verify that log output to terminal can be suppressed.

testLongLog() None

Verify the timestamp is in the log messages when the –long-log flag is set.

test_butlerCliLog() None

Test that the log context manager works with the butler cli to initialize the logging system according to cli inputs for the duration of the command execution and resets the logging system to its previous state or expected state when command execution finishes.

test_helpLogReset() None

Verify that when a command does not execute, like when the help menu is printed instead, that CliLog is still reset.