def test_invalid_options_show_extra_information(testdir):
 testdir.makeini('\n        [pytest]\n        addopts = --invalid-option\n    ')
 result = testdir.runpytest()
 result.stderr.fnmatch_lines(['*error: unrecognized arguments: --invalid-option*', ('*  inifile: %s*' % testdir.tmpdir.join('tox.ini')), ('*  rootdir: %s*' % testdir.tmpdir)])

def test_invalid_options_show_extra_information ( testdir ) : testdir . makeini ( '\n        [pytest]\n        addopts = --invalid-option\n    ' ) result = testdir . runpytest ( ) result . stderr . fnmatch_lines ( [ '*error: unrecognized arguments: --invalid-option*' , ( '*  inifile: %s*' % testdir . tmpdir . join ( 'tox.ini' ) ) , ( '*  rootdir: %s*' % testdir . tmpdir ) ] )
display extra information when pytest exits due to unrecognized options in the command-line .