def test_logxml_check_isdir(pytester: Pytester) -> None:
    """Give an error if --junit-xml is a directory (#2089)"""
    result = pytester.runpytest("--junit-xml=.")
    result.stderr.fnmatch_lines(["*--junitxml must be a filename*"])
Give an error if --junit-xml is a directory (#2089)
testing/test_junitxml.py