| 1 |
====================== |
| 2 |
Tracing hook execution |
| 3 |
====================== |
| 4 |
|
| 5 |
.. autoplugin :: nose2.plugins.printhooks.PrintHooks |
| 6 |
|
| 7 |
Sample output |
| 8 |
------------- |
| 9 |
|
| 10 |
PrintHooks output for a test run that discovers one standard TestCase |
| 11 |
test in a python module. |
| 12 |
|
| 13 |
Hooks that appear indented are called from within other hooks. |
| 14 |
|
| 15 |
:: |
| 16 |
|
| 17 |
handleArgs: CommandLineArgsEvent(handled=False, args=Namespace(collect_only=None, config=['unittest.cfg', 'nose2.cfg'], debugger=None, fail_fast=None, load_plugins=True, log_level=30, print_hooks=None, profile=None, start_dir='.', testNames=[], top_level_directory=None, user_config=True, verbose=0, with_id=None)) |
| 18 |
|
| 19 |
createTests: CreateTestsEvent(loader=<PluggableTestLoader>, testNames=[], module=<module '__main__' from 'bin/nose2'>) |
| 20 |
|
| 21 |
loadTestsFromNames: LoadFromNames(names=[], module=None) |
| 22 |
|
| 23 |
handleFile: HandleFileEvent(handled=False, loader=<PluggableTestLoader>, name='tests.py', path='nose2/tests/functional/support/scenario/one_test/tests.py', pattern='test*.py', topLevelDirectory='nose2/tests/functional/support/scenario/one_test') |
| 24 |
|
| 25 |
matchPath: MatchPathEvent(handled=False, name='tests.py', path='nose2/tests/functional/support/scenario/one_test/tests.py', pattern='test*.py') |
| 26 |
|
| 27 |
loadTestsFromModule: LoadFromModuleEvent(handled=False, loader=<PluggableTestLoader>, module=<module 'tests' from 'nose2/tests/functional/support/scenario/one_test/tests.py'>, extraTests=[]) |
| 28 |
|
| 29 |
loadTestsFromTestCase: LoadFromTestCaseEvent(handled=False, loader=<PluggableTestLoader>, testCase=<class 'tests.Test'>, extraTests=[]) |
| 30 |
|
| 31 |
getTestCaseNames: GetTestCaseNamesEvent(handled=False, loader=<PluggableTestLoader>, testCase=<class 'tests.Test'>, testMethodPrefix=None, extraNames=[], excludedNames=[], isTestMethod=<function isTestMethod at 0x1fccc80>) |
| 32 |
|
| 33 |
handleFile: HandleFileEvent(handled=False, loader=<PluggableTestLoader>, name='tests.pyc', path='nose2/tests/functional/support/scenario/one_test/tests.pyc', pattern='test*.py', topLevelDirectory='nose2/tests/functional/support/scenario/one_test') |
| 34 |
|
| 35 |
runnerCreated: RunnerCreatedEvent(handled=False, runner=<PluggableTestRunner>) |
| 36 |
|
| 37 |
resultCreated: ResultCreatedEvent(handled=False, result=<PluggableTestResult>) |
| 38 |
|
| 39 |
startTestRun: StartTestRunEvent(handled=False, runner=<PluggableTestRunner>, suite=<unittest2.suite.TestSuite tests=[<unittest2.suite.TestSuite tests=[<unittest2.suite.TestSuite tests=[<tests.Test testMethod=test>]>]>]>, result=<PluggableTestResult>, startTime=1327346684.77457, executeTests=<function <lambda> at 0x1fccf50>) |
| 40 |
|
| 41 |
startTest: StartTestEvent(handled=False, test=<tests.Test testMethod=test>, result=<PluggableTestResult>, startTime=1327346684.774765) |
| 42 |
|
| 43 |
reportStartTest: ReportTestEvent(handled=False, testEvent=<nose2.events.StartTestEvent object at 0x1fcd650>, stream=<nose2.util._WritelnDecorator object at 0x1f97a10>) |
| 44 |
|
| 45 |
setTestOutcome: TestOutcomeEvent(handled=False, test=<tests.Test testMethod=test>, result=<PluggableTestResult>, outcome='passed', exc_info=None, reason=None, expected=True, shortLabel=None, longLabel=None) |
| 46 |
|
| 47 |
testOutcome: TestOutcomeEvent(handled=False, test=<tests.Test testMethod=test>, result=<PluggableTestResult>, outcome='passed', exc_info=None, reason=None, expected=True, shortLabel=None, longLabel=None) |
| 48 |
|
| 49 |
reportSuccess: ReportTestEvent(handled=False, testEvent=<nose2.events.TestOutcomeEvent object at 0x1fcd650>, stream=<nose2.util._WritelnDecorator object at 0x1f97a10>) |
| 50 |
. |
| 51 |
stopTest: StopTestEvent(handled=False, test=<tests.Test testMethod=test>, result=<PluggableTestResult>, stopTime=1327346684.775064) |
| 52 |
|
| 53 |
stopTestRun: StopTestRunEvent(handled=False, runner=<PluggableTestRunner>, result=<PluggableTestResult>, stopTime=1327346684.77513, timeTaken=0.00056004524230957031) |
| 54 |
|
| 55 |
afterTestRun: StopTestRunEvent(handled=False, runner=<PluggableTestRunner>, result=<PluggableTestResult>, stopTime=1327346684.77513, timeTaken=0.00056004524230957031) |
| 56 |
|
| 57 |
|
| 58 |
beforeErrorList: ReportSummaryEvent(handled=False, stopTestEvent=<nose2.events.StopTestRunEvent object at 0x1eb0d90>, stream=<nose2.util._WritelnDecorator object at 0x1f97a10>, reportCategories={'failures': [], 'skipped': [], 'errors': [], 'unexpectedSuccesses': [], 'expectedFailures': []}) |
| 59 |
---------------------------------------------------------------------- |
| 60 |
|
| 61 |
beforeSummaryReport: ReportSummaryEvent(handled=False, stopTestEvent=<nose2.events.StopTestRunEvent object at 0x1eb0d90>, stream=<nose2.util._WritelnDecorator object at 0x1f97a10>, reportCategories={'failures': [], 'skipped': [], 'errors': [], 'unexpectedSuccesses': [], 'expectedFailures': []}) |
| 62 |
Ran 1 test in 0.001s |
| 63 |
|
| 64 |
|
| 65 |
wasSuccessful: ResultSuccessEvent(handled=False, result=<PluggableTestResult>, success=False) |
| 66 |
OK |
| 67 |
|
| 68 |
afterSummaryReport: ReportSummaryEvent(handled=False, stopTestEvent=<nose2.events.StopTestRunEvent object at 0x1eb0d90>, stream=<nose2.util._WritelnDecorator object at 0x1f97a10>, reportCategories={'failures': [], 'skipped': [], 'errors': [], 'unexpectedSuccesses': [], 'expectedFailures': []}) |