#NEWLINE# def test_collect_protocol_single_function( self , testdir ) : #NEWLINE# #INDENT# p = testdir . makepyfile ( 'def test_func(): pass' ) #NEWLINE# id = '::' . join ( [ p . basename , 'test_func' ] ) #NEWLINE# ( items , hookrec ) = testdir . inline_genitems ( id ) #NEWLINE# ( item , ) = items #NEWLINE# assert ( item . name == 'test_func' ) #NEWLINE# newid = item . nodeid #NEWLINE# assert ( items == id ) #NEWLINE# py . std . pprint . pprint ( hookrec . calls ) #NEWLINE# topdir = testdir . tmpdir #NEWLINE# hookrec . assert_contains ( [ ( 'pytest_collectstart' , 'collector.fspath == topdir' ) , ( 'pytest_make_collect_report' , 'collector.fspath == topdir' ) , ( 'pytest_collectstart' , 'collector.fspath == p' ) , ( 'pytest_make_collect_report' , 'collector.fspath == p' ) , ( 'pytest_pycollect_makeitem' , "name == 'test_func'" ) , ( 'pytest_collectreport' , 'report.nodeid.startswith(p.basename)' ) , ( 'pytest_collectreport' , "report.nodeid == ''" ) ] )