<s> """<STR_LIT>""" <EOL> import collections <EOL> import sys <EOL> import _pytest . _pluggy as pluggy <EOL> import _pytest . _code <EOL> import py <EOL> import pytest <EOL> from _pytest import runner <EOL> from _pytest . main import EXIT_NOTESTSCOLLECTED <EOL> from _pytest . terminal import TerminalReporter , repr_pythonversion , getreportopt <EOL> from _pytest . terminal import build_summary_stats_line , _plugin_nameversions <EOL> def basic_run_report ( item ) : <EOL> runner . call_and_report ( item , "<STR_LIT>" , log = False ) <EOL> return runner . call_and_report ( item , "<STR_LIT>" , log = False ) <EOL> DistInfo = collections . namedtuple ( '<STR_LIT>' , [ '<STR_LIT>' , '<STR_LIT:version>' ] ) <EOL> class Option : <EOL> def __init__ ( self , verbose = False , fulltrace = False ) : <EOL> self . verbose = verbose <EOL> self . fulltrace = fulltrace <EOL> @ property <EOL> def args ( self ) : <EOL> l = [ ] <EOL> if self . verbose : <EOL> l . append ( '<STR_LIT>' ) <EOL> if self . fulltrace : <EOL> l . append ( '<STR_LIT>' ) <EOL> return l <EOL> def pytest_generate_tests ( metafunc ) : <EOL> if "<STR_LIT>" in metafunc . fixturenames : <EOL> metafunc . addcall ( id = "<STR_LIT:default>" , <EOL> funcargs = { '<STR_LIT>' : Option ( verbose = False ) } ) <EOL> metafunc . addcall ( id = "<STR_LIT>" , <EOL> funcargs = { '<STR_LIT>' : Option ( verbose = True ) } ) <EOL> metafunc . addcall ( id = "<STR_LIT>" , <EOL> funcargs = { '<STR_LIT>' : Option ( verbose = - <NUM_LIT:1> ) } ) <EOL> metafunc . addcall ( id = "<STR_LIT>" , <EOL> funcargs = { '<STR_LIT>' : Option ( fulltrace = True ) } ) <EOL> @ pytest . mark . parametrize ( '<STR_LIT>' , [ <EOL> ( [ DistInfo ( project_name = '<STR_LIT:test>' , version = <NUM_LIT:1> ) ] , [ '<STR_LIT>' ] ) , <EOL> ( [ DistInfo ( project_name = '<STR_LIT>' , version = <NUM_LIT:1> ) ] , [ '<STR_LIT>' ] ) , <EOL> ( [ <EOL> DistInfo ( project_name = '<STR_LIT:test>' , version = <NUM_LIT:1> ) , <EOL> DistInfo ( project_name = '<STR_LIT:test>' , version = <NUM_LIT:1> ) <EOL> ] , [ '<STR_LIT>' ] ) , <EOL> ] , ids = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def test_plugin_nameversion ( input , expected ) : <EOL> pluginlist = [ ( None , x ) for x in input ] <EOL> result = _plugin_nameversions ( pluginlist ) <EOL> assert result == expected <EOL> class TestTerminal : <EOL> def test_pass_skip_fail ( self , testdir , option ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( * option . args ) <EOL> if option . verbose : <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> else : <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" <EOL> ] ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> def test_internalerror ( self , testdir , linecomp ) : <EOL> modcol = testdir . getmodulecol ( "<STR_LIT>" ) <EOL> rep = TerminalReporter ( modcol . config , file = linecomp . stringio ) <EOL> excinfo = pytest . raises ( ValueError , "<STR_LIT>" ) <EOL> rep . pytest_internalerror ( excinfo . getrepr ( ) ) <EOL> linecomp . assert_contains_lines ( [ <EOL> "<STR_LIT>" <EOL> ] ) <EOL> def test_writeline ( self , testdir , linecomp ) : <EOL> modcol = testdir . getmodulecol ( "<STR_LIT>" ) <EOL> rep = TerminalReporter ( modcol . config , file = linecomp . stringio ) <EOL> rep . write_fspath_result ( modcol . nodeid , "<STR_LIT:.>" ) <EOL> rep . write_line ( "<STR_LIT>" ) <EOL> lines = linecomp . stringio . getvalue ( ) . split ( '<STR_LIT:\n>' ) <EOL> assert not lines [ <NUM_LIT:0> ] <EOL> assert lines [ <NUM_LIT:1> ] . endswith ( modcol . name + "<STR_LIT>" ) <EOL> assert lines [ <NUM_LIT:2> ] == "<STR_LIT>" <EOL> def test_show_runtest_logstart ( self , testdir , linecomp ) : <EOL> item = testdir . getitem ( "<STR_LIT>" ) <EOL> tr = TerminalReporter ( item . config , file = linecomp . stringio ) <EOL> item . config . pluginmanager . register ( tr ) <EOL> location = item . reportinfo ( ) <EOL> tr . config . hook . pytest_runtest_logstart ( nodeid = item . nodeid , <EOL> location = location , fspath = str ( item . fspath ) ) <EOL> linecomp . assert_contains_lines ( [ <EOL> "<STR_LIT>" <EOL> ] ) <EOL> def test_runtest_location_shown_before_test_starts ( self , testdir ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> child = testdir . spawn_pytest ( "<STR_LIT>" ) <EOL> child . expect ( "<STR_LIT>" ) <EOL> child . sendeof ( ) <EOL> child . kill ( <NUM_LIT:15> ) <EOL> def test_itemreport_subclasses_show_subclassed_file ( self , testdir ) : <EOL> testdir . makepyfile ( test_p1 = """<STR_LIT>""" ) <EOL> p2 = testdir . makepyfile ( test_p2 = """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( p2 ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> result = testdir . runpytest ( "<STR_LIT>" , p2 ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> def test_itemreport_directclasses_not_shown_as_subclasses ( self , testdir ) : <EOL> a = testdir . mkpydir ( "<STR_LIT>" ) <EOL> a . join ( "<STR_LIT>" ) . write ( _pytest . _code . Source ( """<STR_LIT>""" ) ) <EOL> result = testdir . runpytest ( "<STR_LIT>" ) <EOL> assert result . ret == <NUM_LIT:0> <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> assert "<STR_LIT>" not in result . stdout . str ( ) <EOL> def test_keyboard_interrupt ( self , testdir , option ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( * option . args , no_reraise_ctrlc = True ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> if option . fulltrace : <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> else : <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" <EOL> ] ) <EOL> result . stdout . fnmatch_lines ( [ '<STR_LIT>' ] ) <EOL> def test_keyboard_in_sessionstart ( self , testdir ) : <EOL> testdir . makeconftest ( """<STR_LIT>""" ) <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( no_reraise_ctrlc = True ) <EOL> assert result . ret == <NUM_LIT:2> <EOL> result . stdout . fnmatch_lines ( [ '<STR_LIT>' ] ) <EOL> class TestCollectonly : <EOL> def test_collectonly_basic ( self , testdir ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( "<STR_LIT>" , ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> def test_collectonly_skipped_module ( self , testdir ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> def test_collectonly_failed_module ( self , testdir ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( "<STR_LIT>" ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> def test_collectonly_fatal ( self , testdir ) : <EOL> testdir . makeconftest ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( "<STR_LIT>" ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" <EOL> ] ) <EOL> assert result . ret == <NUM_LIT:3> <EOL> def test_collectonly_simple ( self , testdir ) : <EOL> p = testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( "<STR_LIT>" , p ) <EOL> assert result . ret == <NUM_LIT:0> <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> def test_collectonly_error ( self , testdir ) : <EOL> p = testdir . makepyfile ( "<STR_LIT>" ) <EOL> result = testdir . runpytest ( "<STR_LIT>" , p ) <EOL> assert result . ret == <NUM_LIT:1> <EOL> result . stdout . fnmatch_lines ( _pytest . _code . Source ( """<STR_LIT>""" ) . strip ( ) ) <EOL> def test_collectonly_missing_path ( self , testdir ) : <EOL> """<STR_LIT>""" <EOL> result = testdir . runpytest ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> assert result . ret == <NUM_LIT:4> <EOL> result . stderr . fnmatch_lines ( [ <EOL> '<STR_LIT>' , <EOL> ] ) <EOL> def test_collectonly_quiet ( self , testdir ) : <EOL> testdir . makepyfile ( "<STR_LIT>" ) <EOL> result = testdir . runpytest ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> '<STR_LIT>' , <EOL> ] ) <EOL> def test_collectonly_more_quiet ( self , testdir ) : <EOL> testdir . makepyfile ( test_fun = "<STR_LIT>" ) <EOL> result = testdir . runpytest ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> '<STR_LIT>' , <EOL> ] ) <EOL> def test_repr_python_version ( monkeypatch ) : <EOL> try : <EOL> monkeypatch . setattr ( sys , '<STR_LIT>' , ( <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:1> , '<STR_LIT>' , <NUM_LIT:0> ) ) <EOL> assert repr_pythonversion ( ) == "<STR_LIT>" <EOL> py . std . sys . version_info = x = ( <NUM_LIT:2> , <NUM_LIT:3> ) <EOL> assert repr_pythonversion ( ) == str ( x ) <EOL> finally : <EOL> monkeypatch . undo ( ) <EOL> class TestFixtureReporting : <EOL> def test_setup_fixture_error ( self , testdir ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> assert result . ret != <NUM_LIT:0> <EOL> def test_teardown_fixture_error ( self , testdir ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> def test_teardown_fixture_error_and_test_failure ( self , testdir ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> class TestTerminalFunctional : <EOL> def test_deselected ( self , testdir ) : <EOL> testpath = testdir . makepyfile ( """<STR_LIT>""" <EOL> ) <EOL> result = testdir . runpytest ( "<STR_LIT>" , "<STR_LIT>" , testpath ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> assert result . ret == <NUM_LIT:0> <EOL> def test_no_skip_summary_if_failure ( self , testdir ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( ) <EOL> assert result . stdout . str ( ) . find ( "<STR_LIT>" ) == - <NUM_LIT:1> <EOL> assert result . ret == <NUM_LIT:1> <EOL> def test_passes ( self , testdir ) : <EOL> p1 = testdir . makepyfile ( """<STR_LIT>""" ) <EOL> old = p1 . dirpath ( ) . chdir ( ) <EOL> try : <EOL> result = testdir . runpytest ( ) <EOL> finally : <EOL> old . chdir ( ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> assert result . ret == <NUM_LIT:0> <EOL> def test_header_trailer_info ( self , testdir ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( ) <EOL> verinfo = "<STR_LIT:.>" . join ( map ( str , py . std . sys . version_info [ : <NUM_LIT:3> ] ) ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" % ( <EOL> py . std . sys . platform , verinfo , <EOL> pytest . __version__ , py . __version__ , pluggy . __version__ ) , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> if pytest . config . pluginmanager . list_plugin_distinfo ( ) : <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> def test_showlocals ( self , testdir ) : <EOL> p1 = testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( p1 , '<STR_LIT>' ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] ) <EOL> def test_verbose_reporting ( self , testdir , pytestconfig ) : <EOL> p1 = testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( p1 , '<STR_LIT>' ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> assert result . ret == <NUM_LIT:1> <EOL> if not pytestconfig . pluginmanager . get_plugin ( "<STR_LIT>" ) : <EOL> pytest . skip ( "<STR_LIT>" ) <EOL> result = testdir . runpytest ( p1 , '<STR_LIT>' , '<STR_LIT>' ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> assert result . ret == <NUM_LIT:1> <EOL> def test_quiet_reporting ( self , testdir ) : <EOL> p1 = testdir . makepyfile ( "<STR_LIT>" ) <EOL> result = testdir . runpytest ( p1 , '<STR_LIT>' ) <EOL> s = result . stdout . str ( ) <EOL> assert '<STR_LIT>' not in s <EOL> assert p1 . basename not in s <EOL> assert "<STR_LIT>" not in s <EOL> assert "<STR_LIT>" in s <EOL> def test_more_quiet_reporting ( self , testdir ) : <EOL> p1 = testdir . makepyfile ( "<STR_LIT>" ) <EOL> result = testdir . runpytest ( p1 , '<STR_LIT>' ) <EOL> s = result . stdout . str ( ) <EOL> assert '<STR_LIT>' not in s <EOL> assert p1 . basename not in s <EOL> assert "<STR_LIT>" not in s <EOL> assert "<STR_LIT>" not in s <EOL> def test_fail_extra_reporting ( testdir ) : <EOL> testdir . makepyfile ( "<STR_LIT>" ) <EOL> result = testdir . runpytest ( ) <EOL> assert '<STR_LIT>' not in result . stdout . str ( ) <EOL> result = testdir . runpytest ( '<STR_LIT>' ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> def test_fail_reporting_on_pass ( testdir ) : <EOL> testdir . makepyfile ( "<STR_LIT>" ) <EOL> result = testdir . runpytest ( '<STR_LIT>' ) <EOL> assert '<STR_LIT>' not in result . stdout . str ( ) <EOL> def test_pass_extra_reporting ( testdir ) : <EOL> testdir . makepyfile ( "<STR_LIT>" ) <EOL> result = testdir . runpytest ( ) <EOL> assert '<STR_LIT>' not in result . stdout . str ( ) <EOL> result = testdir . runpytest ( '<STR_LIT>' ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> def test_pass_reporting_on_fail ( testdir ) : <EOL> testdir . makepyfile ( "<STR_LIT>" ) <EOL> result = testdir . runpytest ( '<STR_LIT>' ) <EOL> assert '<STR_LIT>' not in result . stdout . str ( ) <EOL> def test_pass_output_reporting ( testdir ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( ) <EOL> assert '<STR_LIT>' not in result . stdout . str ( ) <EOL> result = testdir . runpytest ( '<STR_LIT>' ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> def test_color_yes ( testdir ) : <EOL> testdir . makepyfile ( "<STR_LIT>" ) <EOL> result = testdir . runpytest ( '<STR_LIT>' ) <EOL> assert '<STR_LIT>' in result . stdout . str ( ) <EOL> assert '<STR_LIT>' in result . stdout . str ( ) <EOL> def test_color_no ( testdir ) : <EOL> testdir . makepyfile ( "<STR_LIT>" ) <EOL> result = testdir . runpytest ( '<STR_LIT>' ) <EOL> assert '<STR_LIT>' in result . stdout . str ( ) <EOL> assert '<STR_LIT>' not in result . stdout . str ( ) <EOL> @ pytest . mark . parametrize ( '<STR_LIT>' , [ True , False ] ) <EOL> def test_color_yes_collection_on_non_atty ( testdir , verbose ) : <EOL> """<STR_LIT>""" <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> args = [ '<STR_LIT>' ] <EOL> if verbose : <EOL> args . append ( '<STR_LIT>' ) <EOL> result = testdir . runpytest ( * args ) <EOL> assert '<STR_LIT>' in result . stdout . str ( ) <EOL> assert '<STR_LIT>' in result . stdout . str ( ) <EOL> assert '<STR_LIT>' not in result . stdout . str ( ) <EOL> if verbose : <EOL> assert '<STR_LIT>' in result . stdout . str ( ) <EOL> assert '<STR_LIT>' in result . stdout . str ( ) <EOL> def test_getreportopt ( ) : <EOL> class config : <EOL> class option : <EOL> reportchars = "<STR_LIT>" <EOL> config . option . report = "<STR_LIT>" <EOL> assert getreportopt ( config ) == "<STR_LIT:x>" <EOL> config . option . report = "<STR_LIT>" <EOL> assert getreportopt ( config ) == "<STR_LIT>" <EOL> config . option . report = "<STR_LIT>" <EOL> assert getreportopt ( config ) == "<STR_LIT>" <EOL> config . option . report = "<STR_LIT>" <EOL> config . option . reportchars = "<STR_LIT>" <EOL> assert getreportopt ( config ) == "<STR_LIT>" <EOL> config . option . reportchars = "<STR_LIT>" <EOL> assert getreportopt ( config ) == "<STR_LIT>" <EOL> def test_terminalreporter_reportopt_addopts ( testdir ) : <EOL> testdir . makeini ( "<STR_LIT>" ) <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" <EOL> ] ) <EOL> def test_tbstyle_short ( testdir ) : <EOL> p = testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( "<STR_LIT>" ) <EOL> s = result . stdout . str ( ) <EOL> assert '<STR_LIT>' not in s <EOL> assert '<STR_LIT>' not in s <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" % p . basename , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> result = testdir . runpytest ( ) <EOL> s = result . stdout . str ( ) <EOL> assert '<STR_LIT>' in s <EOL> assert '<STR_LIT>' in s <EOL> def test_traceconfig ( testdir , monkeypatch ) : <EOL> result = testdir . runpytest ( "<STR_LIT>" ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" <EOL> ] ) <EOL> assert result . ret == EXIT_NOTESTSCOLLECTED <EOL> class TestGenericReporting : <EOL> """<STR_LIT>""" <EOL> def test_collect_fail ( self , testdir , option ) : <EOL> testdir . makepyfile ( "<STR_LIT>" ) <EOL> result = testdir . runpytest ( * option . args ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> def test_maxfailures ( self , testdir , option ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( "<STR_LIT>" , * option . args ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> def test_tb_option ( self , testdir , option ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> for tbopt in [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] : <EOL> print ( '<STR_LIT>' % tbopt ) <EOL> result = testdir . runpytest ( '<STR_LIT>' % tbopt ) <EOL> s = result . stdout . str ( ) <EOL> if tbopt == "<STR_LIT>" : <EOL> assert '<STR_LIT>' in s <EOL> else : <EOL> assert '<STR_LIT>' not in s <EOL> if tbopt != "<STR_LIT>" : <EOL> assert '<STR_LIT>' in s <EOL> assert '<STR_LIT>' in s <EOL> else : <EOL> assert '<STR_LIT>' not in s <EOL> assert '<STR_LIT>' not in s <EOL> assert '<STR_LIT>' not in s <EOL> def test_tb_crashline ( self , testdir , option ) : <EOL> p = testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( "<STR_LIT>" ) <EOL> bn = p . basename <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" % bn , <EOL> "<STR_LIT>" % bn , <EOL> ] ) <EOL> s = result . stdout . str ( ) <EOL> assert "<STR_LIT>" not in s <EOL> def test_pytest_report_header ( self , testdir , option ) : <EOL> testdir . makeconftest ( """<STR_LIT>""" ) <EOL> testdir . mkdir ( "<STR_LIT:a>" ) . join ( "<STR_LIT>" ) . write ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( "<STR_LIT:a>" ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> str ( testdir . tmpdir ) , <EOL> ] ) <EOL> @ pytest . mark . xfail ( "<STR_LIT>" ) <EOL> def test_fdopen_kept_alive_issue124 ( testdir ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> "<STR_LIT>" <EOL> ] ) <EOL> def test_tbstyle_native_setup_error ( testdir ) : <EOL> testdir . makepyfile ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( "<STR_LIT>" ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> '<STR_LIT>' <EOL> ] ) <EOL> def test_terminal_summary ( testdir ) : <EOL> testdir . makeconftest ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( ) <EOL> result . stdout . fnmatch_lines ( """<STR_LIT>""" ) <EOL> def test_terminal_summary_warnings_are_displayed ( testdir ) : <EOL> """<STR_LIT>""" <EOL> testdir . makeconftest ( """<STR_LIT>""" ) <EOL> result = testdir . runpytest ( '<STR_LIT>' ) <EOL> result . stdout . fnmatch_lines ( [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] ) <EOL> @ pytest . mark . parametrize ( "<STR_LIT>" , [ <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) , "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT:error>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT:error>" : ( <NUM_LIT:1> , ) , "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) , "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) , <EOL> "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT:5> ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) , "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) , "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) , "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) , "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , { "<STR_LIT>" : ( <NUM_LIT:1> , ) , "<STR_LIT>" : ( <NUM_LIT:1> , ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , <EOL> { "<STR_LIT>" : ( <NUM_LIT:1> , <NUM_LIT:2> ) , "<STR_LIT>" : ( <NUM_LIT:1> , ) , "<STR_LIT>" : ( <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ) } ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , <EOL> { "<STR_LIT>" : ( <NUM_LIT:1> , ) , <EOL> "<STR_LIT>" : ( <NUM_LIT:1> , <NUM_LIT:2> ) , <EOL> "<STR_LIT>" : ( <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ) , <EOL> "<STR_LIT>" : ( <NUM_LIT:1> , <NUM_LIT:2> ) } ) , <EOL> ] ) <EOL> def test_summary_stats ( exp_line , exp_color , stats_arg ) : <EOL> print ( "<STR_LIT>" % stats_arg ) <EOL> print ( "<STR_LIT>" % ( exp_line , exp_color ) ) <EOL> ( line , color ) = build_summary_stats_line ( stats_arg ) <EOL> print ( "<STR_LIT>" % ( line , color ) ) <EOL> assert line == exp_line <EOL> assert color == exp_color </s>
