def test_invalid_setup_py(self, pytester: Pytester):
        """
        Test to make sure that pytest reads setup.py files that are not used
        for python packages when ran with --doctest-modules
        """
        p = pytester.makepyfile(
            setup="""
            def test_foo():
                return 'bar'
        """
        )
        result = pytester.runpytest(p, "--doctest-modules")
        result.stdout.fnmatch_lines(["*collected 1 item*"])

        Test to make sure that pytest reads setup.py files that are not used
        for python packages when ran with --doctest-modules
        
testing/test_doctest.py