armi.tests.test_runLog module

Tests of the runLog tooling.

class armi.tests.test_runLog.TestRunLog(methodName='runTest')[source]

Bases: TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_setVerbosityFromInteger()[source]

Test that the log verbosity can be set with an integer.

Test Case: The run log verbosity can be configured with an integer. T_ARMI_LOG0
signature: test_setVerbosityFromInteger
requirements: R_ARMI_LOG
test_setVerbosityFromString()[source]

Test that the log verbosity can be set with a string.

Test Case: The run log verbosity can be configured with a string. T_ARMI_LOG1
signature: test_setVerbosityFromString
requirements: R_ARMI_LOG
test_verbosityOutOfRange()[source]

Test that the log verbosity setting resets to a canonical value when it is out of range.

test_invalidSetVerbosityByString()[source]

Test that the log verbosity setting fails if the integer is invalid.

test_parentRunLogging()[source]

A basic test of the logging of the parent runLog.

test_getWhiteSpace()[source]
test_warningReport()[source]

A simple test of the warning tracking and reporting logic.

Test Case: Generate a warning report after a simulation is complete. T_ARMI_LOG2
signature: test_warningReport
requirements: R_ARMI_LOG
test_warningReportInvalid()[source]

A test of warningReport in an invalid situation.

Test Case: Test an important edge case for a warning report. T_ARMI_LOG3
signature: test_warningReportInvalid
requirements: R_ARMI_LOG
test_closeLogging()[source]

A basic test of the close() functionality.

test_setVerbosity()[source]

Let’s test the setVerbosity() method carefully.

Test Case: The run log has configurable verbosity. T_ARMI_LOG4
signature: test_setVerbosity
requirements: R_ARMI_LOG
Test Case: The run log can log to stream. T_ARMI_LOG_IO0
signature: test_setVerbosity
requirements: R_ARMI_LOG_IO
test_setVerbosityBeforeStartLog()[source]

The user/dev may accidentally call setVerbosity() before startLog(), this should be mostly supportable. This is just an edge case.

Test Case: Test that we support the user setting log verbosity BEFORE the logging starts. T_ARMI_LOG5
signature: test_setVerbosityBeforeStartLog
requirements: R_ARMI_LOG
test_callingStartLogMultipleTimes()[source]

Calling startLog() multiple times will lead to multiple output files, but logging should still work.

test_concatenateLogs()[source]

Simple test of the concat logs function.

Test Case: The run log combines logs from different processes. T_ARMI_LOG_MPI
signature: test_concatenateLogs
requirements: R_ARMI_LOG_MPI
Test Case: The run log can log to file. T_ARMI_LOG_IO1
signature: test_concatenateLogs
requirements: R_ARMI_LOG_IO
test_createLogDir()[source]

Test the createLogDir() method.

Test Case: Test that log directories can be created for logging output files. T_ARMI_LOG6
signature: test_createLogDir
requirements: R_ARMI_LOG
class armi.tests.test_runLog.TestRunLogger(methodName='runTest')[source]

Bases: TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_getDuplicatesFilter()[source]
test_allowStopDuplicates()[source]
test_write()[source]

Test that we can write text to the logger output stream.

Test Case: Write logging text to the logging stream and/or file. T_ARMI_LOG7
signature: test_write
requirements: R_ARMI_LOG