-
Notifications
You must be signed in to change notification settings - Fork 2
Test logging functions
test_logger is a predefined logger, which can be directly used. And all pass/fail functions will use this logger to log information.
You could add handlers to the logger as you want.
The default log-level of this logger is logging.DEBUG. You could change it as you want.
You could use your logger to replace test_logger by invoking this function. This function does nothing else to replace the logger using the one you indicated
This is for pytest or nose plugin use. Do not use this functions in normal cases.
To define if allowed to detect function (case name) automatically. By default, it's true, so that the case could be logged before steps/checks logged in the particular case.
This is also used to temporarily disable function/case detection, e.g. when you invoke another function in a case, but you will count all the check in the invoked function into your case, you could disable the function auto-detection in the child function. See lesson6 in the source code test_examples folder.