def test_logxml_check_isdir(testdir):
 result = testdir.runpytest('--junit-xml=.')
 result.stderr.fnmatch_lines(['*--junitxml must be a filename*'])

def test_logxml_check_isdir ( testdir ) : result = testdir . runpytest ( '--junit-xml=.' ) result . stderr . fnmatch_lines ( [ '*--junitxml must be a filename*' ] )
give an error if --junit-xml is a directory .