Fortran-FOSS-Programmers / ford

Automatically generates FORtran Documentation from comments within the code.
https://forddocs.readthedocs.io
GNU General Public License v3.0
405 stars 131 forks source link

Add tests on Fedora #569

Closed bkmgit closed 10 months ago

bkmgit commented 11 months ago

At present Python dependencies installed using pip, though would prefer to use those in Fedora repositories.

bkmgit commented 11 months ago

Failing tests with current workflow (uses Python 3.12):

==================================== ERRORS ====================================
________________________ ERROR at setup of test_nav_bar ________________________

command_line_args = {'config': None, 'css': None, 'dbg': None, 'exclude': None, ...}
proj_docs = "\nHi, my name is ${USER}.\n\nThis is a project which I wrote. This file will provide the documents. I'm\nwriting the ...ur imagination run wild. As you can tell, I'm more or less just\nfilling in space now. This will be the last sentence."
proj_data = ProjectSettings(alias={}, author='John Doe', author_description='I program stuff in Fortran.', author_pic=None, bitbuc... program which I wrote.', terms_of_service_url=None, twitter=None, version=None, warn=False, website=None, year='2023')
directory = ''

    def parse_arguments(
        command_line_args: dict,
        proj_docs: str,
        proj_data: ProjectSettings,
        directory: PathLike = pathlib.Path("."),
    ):
        """Consolidates arguments from the command line and from the project
        file, and then normalises them how the rest of the code expects
        """

        if (config := command_line_args.get("config", None)) is not None:
            toml_string = "\n".join(config.split(";"))
            for key, value in tomllib.loads(toml_string).items():
                setattr(proj_data, key, value)

        # Get the default options, and any over-rides, straightened out
        for key, value in command_line_args.items():
            if value is not None:
                setattr(proj_data, key, value)

        proj_data.normalise_paths(directory)

        proj_data.creation_date = datetime.now().strftime(proj_data.creation_date)

        # Make sure no src_dir is contained within output_dir
        for srcdir in proj_data.src_dir:
            # In Python 3.9+ we can use pathlib.Path.is_relative_to
            if proj_data.output_dir in (srcdir, *srcdir.parents):
                raise ValueError(
                    f"Source directory {srcdir} is a subdirectory of output directory {proj_data.output_dir}."
                )

        # Add gitter sidecar if specified in metadata
        if proj_data.gitter_sidecar is not None:
            proj_docs += f"""
            <script>
                ((window.gitter = {{}}).chat = {{}}).options = {{
                room: '{proj_data.gitter_sidecar.strip()}'
                }};
            </script>
            <script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
            """

        # Handle preprocessor:
        if proj_data.preprocess:
            command = proj_data.preprocessor.split() + [os.devnull]
            # Check whether preprocessor works (reading nothing from stdin)
            try:
>               subprocess.run(command, check=True, capture_output=True, text=True)

/ford/ford/__init__.py:368: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/subprocess.py:548: in run
    with Popen(*popenargs, **kwargs) as process:
/usr/lib64/python3.12/subprocess.py:1026: in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Popen: returncode: 255 args: ['cpp', '-traditional-cpp', '-E', '-D__GFORTRA...>
args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null']
executable = b'cpp', preexec_fn = None, close_fds = True, pass_fds = ()
cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False
p2cread = -1, p2cwrite = -1, c2pread = 12, c2pwrite = 13, errread = 14
errwrite = 15, restore_signals = True, gid = None, gids = None, uid = None
umask = -1, start_new_session = False, process_group = -1

    def _execute_child(self, args, executable, preexec_fn, close_fds,
                       pass_fds, cwd, env,
                       startupinfo, creationflags, shell,
                       p2cread, p2cwrite,
                       c2pread, c2pwrite,
                       errread, errwrite,
                       restore_signals,
                       gid, gids, uid, umask,
                       start_new_session, process_group):
        """Execute program (POSIX version)"""

        if isinstance(args, (str, bytes)):
            args = [args]
        elif isinstance(args, os.PathLike):
            if shell:
                raise TypeError('path-like args is not allowed when '
                                'shell is true')
            args = [args]
        else:
            args = list(args)

        if shell:
            # On Android the default shell is at '/system/bin/sh'.
            unix_shell = ('/system/bin/sh' if
                      hasattr(sys, 'getandroidapilevel') else '/bin/sh')
            args = [unix_shell, "-c"] + args
            if executable:
                args[0] = executable

        if executable is None:
            executable = args[0]

        sys.audit("subprocess.Popen", executable, args, cwd, env)

        if (_USE_POSIX_SPAWN
                and os.path.dirname(executable)
                and preexec_fn is None
                and not close_fds
                and not pass_fds
                and cwd is None
                and (p2cread == -1 or p2cread > 2)
                and (c2pwrite == -1 or c2pwrite > 2)
                and (errwrite == -1 or errwrite > 2)
                and not start_new_session
                and process_group == -1
                and gid is None
                and gids is None
                and uid is None
                and umask < 0):
            self._posix_spawn(args, executable, env, restore_signals,
                              p2cread, p2cwrite,
                              c2pread, c2pwrite,
                              errread, errwrite)
            return

        orig_executable = executable

        # For transferring possible exec failure from child to parent.
        # Data format: "exception name:hex errno:description"
        # Pickle is not used; it is complex and involves memory allocation.
        errpipe_read, errpipe_write = os.pipe()
        # errpipe_write must not be in the standard io 0, 1, or 2 fd range.
        low_fds_to_close = []
        while errpipe_write < 3:
            low_fds_to_close.append(errpipe_write)
            errpipe_write = os.dup(errpipe_write)
        for low_fd in low_fds_to_close:
            os.close(low_fd)
        try:
            try:
                # We must avoid complex work that could involve
                # malloc or free in the child process to avoid
                # potential deadlocks, thus we do all this here.
                # and pass it to fork_exec()

                if env is not None:
                    env_list = []
                    for k, v in env.items():
                        k = os.fsencode(k)
                        if b'=' in k:
                            raise ValueError("illegal environment variable name")
                        env_list.append(k + b'=' + os.fsencode(v))
                else:
                    env_list = None  # Use execv instead of execve.
                executable = os.fsencode(executable)
                if os.path.dirname(executable):
                    executable_list = (executable,)
                else:
                    # This matches the behavior of os._execvpe().
                    executable_list = tuple(
                        os.path.join(os.fsencode(dir), executable)
                        for dir in os.get_exec_path(env))
                fds_to_keep = set(pass_fds)
                fds_to_keep.add(errpipe_write)
                self.pid = _fork_exec(
                        args, executable_list,
                        close_fds, tuple(sorted(map(int, fds_to_keep))),
                        cwd, env_list,
                        p2cread, p2cwrite, c2pread, c2pwrite,
                        errread, errwrite,
                        errpipe_read, errpipe_write,
                        restore_signals, start_new_session,
                        process_group, gid, gids, uid, umask,
                        preexec_fn, _USE_VFORK)
                self._child_created = True
            finally:
                # be sure the FD is closed no matter what
                os.close(errpipe_write)

            self._close_pipe_fds(p2cread, p2cwrite,
                                 c2pread, c2pwrite,
                                 errread, errwrite)

            # Wait for exec to fail or succeed; possibly raising an
            # exception (limited in size)
            errpipe_data = bytearray()
            while True:
                part = os.read(errpipe_read, 50000)
                errpipe_data += part
                if not part or len(errpipe_data) > 50000:
                    break
        finally:
            # be sure the FD is closed no matter what
            os.close(errpipe_read)

        if errpipe_data:
            try:
                pid, sts = os.waitpid(self.pid, 0)
                if pid == self.pid:
                    self._handle_exitstatus(sts)
                else:
                    self.returncode = sys.maxsize
            except ChildProcessError:
                pass

            try:
                exception_name, hex_errno, err_msg = (
                        errpipe_data.split(b':', 2))
                # The encoding here should match the encoding
                # written in by the subprocess implementations
                # like _posixsubprocess
                err_msg = err_msg.decode()
            except ValueError:
                exception_name = b'SubprocessError'
                hex_errno = b'0'
                err_msg = 'Bad exception data from child: {!r}'.format(
                              bytes(errpipe_data))
            child_exception_type = getattr(
                    builtins, exception_name.decode('ascii'),
                    SubprocessError)
            if issubclass(child_exception_type, OSError) and hex_errno:
                errno_num = int(hex_errno, 16)
                child_exec_never_called = (err_msg == "noexec")
                if child_exec_never_called:
                    err_msg = ""
                    # The error must be from chdir(cwd).
                    err_filename = cwd
                else:
                    err_filename = orig_executable
                if errno_num != 0:
                    err_msg = os.strerror(errno_num)
>               raise child_exception_type(errno_num, err_msg, err_filename)
E               FileNotFoundError: [Errno 2] No such file or directory: 'cpp'

/usr/lib64/python3.12/subprocess.py:1950: FileNotFoundError

During handling of the above exception, another exception occurred:

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
        shutil.copytree(this_dir / "../example", tmp_path)

        with pytest.MonkeyPatch.context() as m:
            os.chdir(tmp_path)
            m.setattr(sys, "argv", ["ford", "example-project-file.md"])
>           ford.run()

/ford/test/test_example.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/ford/ford/__init__.py:487: in run
    proj_data, proj_docs = initialize()
/ford/ford/__init__.py:138: in initialize
    return parse_arguments(vars(args), proj_docs, proj_data, directory)
/ford/ford/__init__.py:371: in parse_arguments
    exit(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Use exit() or Ctrl-D (i.e. EOF) to exit
code = "Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error:\n    [Err...rocessor' option in 'example-project-file.md'.\nOtherwise, please set 'preprocess: False' in 'example-project-file.md'"

>   ???
E   SystemExit: Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error:
E       [Errno 2] No such file or directory: 'cpp'
E   
E   If you need to preprocess files, please fix the 'preprocessor' option in 'example-project-file.md'.
E   Otherwise, please set 'preprocess: False' in 'example-project-file.md'

<frozen _sitebuiltins>:26: SystemExit
_______________________ ERROR at setup of test_jumbotron _______________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
__________________ ERROR at setup of test_developer_info_box ___________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
_________________________ ERROR at setup of test_latex _________________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
___________________ ERROR at setup of test_source_file_links ___________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
_____________________ ERROR at setup of test_module_links ______________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
___________________ ERROR at setup of test_procedures_links ____________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
______________________ ERROR at setup of test_types_links ______________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
______________ ERROR at setup of test_types_type_bound_procedure _______________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
_______________ ERROR at setup of test_types_constructor_summary _______________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
________________ ERROR at setup of test_types_constructor_page _________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
____________________ ERROR at setup of test_types_finaliser ____________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
____________________ ERROR at setup of test_graph_submodule ____________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
________________ ERROR at setup of test_procedure_return_value _________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
_______________________ ERROR at setup of test_info_bar ________________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
______________________ ERROR at setup of test_side_panel _______________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
____________________ ERROR at setup of test_variable_lists _____________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
______________________ ERROR at setup of test_deprecated _______________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
________________ ERROR at setup of test_private_procedure_links ________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
________________ ERROR at setup of test_public_procedure_links _________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
______________ ERROR at setup of test_all_internal_links_resolve _______________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
_______ ERROR at setup of test_submodule_procedure_implementation_links ________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
______________________ ERROR at setup of test_interfaces _______________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
_____________________ ERROR at setup of test_static_pages ______________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
____________________ ERROR at setup of test_namelist_lists _____________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
_____________________ ERROR at setup of test_namelist_page _____________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
________ ERROR at setup of test_linking_to_page_alias_from_nested_page _________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')

    @pytest.fixture(scope="module")
    def example_project(tmp_path_factory):
        this_dir = pathlib.Path(__file__).parent
        tmp_path = tmp_path_factory.getbasetemp() / "example"
>       shutil.copytree(this_dir / "../example", tmp_path)

/ford/test/test_example.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/example'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/example'

<frozen os>:225: FileExistsError
___________________ ERROR at setup of test_external_project ____________________

command_line_args = {'config': None, 'css': None, 'dbg': None, 'exclude': None, ...}
proj_docs = ''
proj_data = ProjectSettings(alias={}, author=None, author_description=None, author_pic=None, bitbucket=None, coloured_edges=False,...ect/src')], summary=None, terms_of_service_url=None, twitter=None, version=None, warn=False, website=None, year='2023')
directory = ''

    def parse_arguments(
        command_line_args: dict,
        proj_docs: str,
        proj_data: ProjectSettings,
        directory: PathLike = pathlib.Path("."),
    ):
        """Consolidates arguments from the command line and from the project
        file, and then normalises them how the rest of the code expects
        """

        if (config := command_line_args.get("config", None)) is not None:
            toml_string = "\n".join(config.split(";"))
            for key, value in tomllib.loads(toml_string).items():
                setattr(proj_data, key, value)

        # Get the default options, and any over-rides, straightened out
        for key, value in command_line_args.items():
            if value is not None:
                setattr(proj_data, key, value)

        proj_data.normalise_paths(directory)

        proj_data.creation_date = datetime.now().strftime(proj_data.creation_date)

        # Make sure no src_dir is contained within output_dir
        for srcdir in proj_data.src_dir:
            # In Python 3.9+ we can use pathlib.Path.is_relative_to
            if proj_data.output_dir in (srcdir, *srcdir.parents):
                raise ValueError(
                    f"Source directory {srcdir} is a subdirectory of output directory {proj_data.output_dir}."
                )

        # Add gitter sidecar if specified in metadata
        if proj_data.gitter_sidecar is not None:
            proj_docs += f"""
            <script>
                ((window.gitter = {{}}).chat = {{}}).options = {{
                room: '{proj_data.gitter_sidecar.strip()}'
                }};
            </script>
            <script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
            """

        # Handle preprocessor:
        if proj_data.preprocess:
            command = proj_data.preprocessor.split() + [os.devnull]
            # Check whether preprocessor works (reading nothing from stdin)
            try:
>               subprocess.run(command, check=True, capture_output=True, text=True)

/ford/ford/__init__.py:368: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/subprocess.py:548: in run
    with Popen(*popenargs, **kwargs) as process:
/usr/lib64/python3.12/subprocess.py:1026: in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Popen: returncode: 255 args: ['cpp', '-traditional-cpp', '-E', '-D__GFORTRA...>
args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null']
executable = b'cpp', preexec_fn = None, close_fds = True, pass_fds = ()
cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False
p2cread = -1, p2cwrite = -1, c2pread = 12, c2pwrite = 13, errread = 14
errwrite = 15, restore_signals = True, gid = None, gids = None, uid = None
umask = -1, start_new_session = False, process_group = -1

    def _execute_child(self, args, executable, preexec_fn, close_fds,
                       pass_fds, cwd, env,
                       startupinfo, creationflags, shell,
                       p2cread, p2cwrite,
                       c2pread, c2pwrite,
                       errread, errwrite,
                       restore_signals,
                       gid, gids, uid, umask,
                       start_new_session, process_group):
        """Execute program (POSIX version)"""

        if isinstance(args, (str, bytes)):
            args = [args]
        elif isinstance(args, os.PathLike):
            if shell:
                raise TypeError('path-like args is not allowed when '
                                'shell is true')
            args = [args]
        else:
            args = list(args)

        if shell:
            # On Android the default shell is at '/system/bin/sh'.
            unix_shell = ('/system/bin/sh' if
                      hasattr(sys, 'getandroidapilevel') else '/bin/sh')
            args = [unix_shell, "-c"] + args
            if executable:
                args[0] = executable

        if executable is None:
            executable = args[0]

        sys.audit("subprocess.Popen", executable, args, cwd, env)

        if (_USE_POSIX_SPAWN
                and os.path.dirname(executable)
                and preexec_fn is None
                and not close_fds
                and not pass_fds
                and cwd is None
                and (p2cread == -1 or p2cread > 2)
                and (c2pwrite == -1 or c2pwrite > 2)
                and (errwrite == -1 or errwrite > 2)
                and not start_new_session
                and process_group == -1
                and gid is None
                and gids is None
                and uid is None
                and umask < 0):
            self._posix_spawn(args, executable, env, restore_signals,
                              p2cread, p2cwrite,
                              c2pread, c2pwrite,
                              errread, errwrite)
            return

        orig_executable = executable

        # For transferring possible exec failure from child to parent.
        # Data format: "exception name:hex errno:description"
        # Pickle is not used; it is complex and involves memory allocation.
        errpipe_read, errpipe_write = os.pipe()
        # errpipe_write must not be in the standard io 0, 1, or 2 fd range.
        low_fds_to_close = []
        while errpipe_write < 3:
            low_fds_to_close.append(errpipe_write)
            errpipe_write = os.dup(errpipe_write)
        for low_fd in low_fds_to_close:
            os.close(low_fd)
        try:
            try:
                # We must avoid complex work that could involve
                # malloc or free in the child process to avoid
                # potential deadlocks, thus we do all this here.
                # and pass it to fork_exec()

                if env is not None:
                    env_list = []
                    for k, v in env.items():
                        k = os.fsencode(k)
                        if b'=' in k:
                            raise ValueError("illegal environment variable name")
                        env_list.append(k + b'=' + os.fsencode(v))
                else:
                    env_list = None  # Use execv instead of execve.
                executable = os.fsencode(executable)
                if os.path.dirname(executable):
                    executable_list = (executable,)
                else:
                    # This matches the behavior of os._execvpe().
                    executable_list = tuple(
                        os.path.join(os.fsencode(dir), executable)
                        for dir in os.get_exec_path(env))
                fds_to_keep = set(pass_fds)
                fds_to_keep.add(errpipe_write)
                self.pid = _fork_exec(
                        args, executable_list,
                        close_fds, tuple(sorted(map(int, fds_to_keep))),
                        cwd, env_list,
                        p2cread, p2cwrite, c2pread, c2pwrite,
                        errread, errwrite,
                        errpipe_read, errpipe_write,
                        restore_signals, start_new_session,
                        process_group, gid, gids, uid, umask,
                        preexec_fn, _USE_VFORK)
                self._child_created = True
            finally:
                # be sure the FD is closed no matter what
                os.close(errpipe_write)

            self._close_pipe_fds(p2cread, p2cwrite,
                                 c2pread, c2pwrite,
                                 errread, errwrite)

            # Wait for exec to fail or succeed; possibly raising an
            # exception (limited in size)
            errpipe_data = bytearray()
            while True:
                part = os.read(errpipe_read, 50000)
                errpipe_data += part
                if not part or len(errpipe_data) > 50000:
                    break
        finally:
            # be sure the FD is closed no matter what
            os.close(errpipe_read)

        if errpipe_data:
            try:
                pid, sts = os.waitpid(self.pid, 0)
                if pid == self.pid:
                    self._handle_exitstatus(sts)
                else:
                    self.returncode = sys.maxsize
            except ChildProcessError:
                pass

            try:
                exception_name, hex_errno, err_msg = (
                        errpipe_data.split(b':', 2))
                # The encoding here should match the encoding
                # written in by the subprocess implementations
                # like _posixsubprocess
                err_msg = err_msg.decode()
            except ValueError:
                exception_name = b'SubprocessError'
                hex_errno = b'0'
                err_msg = 'Bad exception data from child: {!r}'.format(
                              bytes(errpipe_data))
            child_exception_type = getattr(
                    builtins, exception_name.decode('ascii'),
                    SubprocessError)
            if issubclass(child_exception_type, OSError) and hex_errno:
                errno_num = int(hex_errno, 16)
                child_exec_never_called = (err_msg == "noexec")
                if child_exec_never_called:
                    err_msg = ""
                    # The error must be from chdir(cwd).
                    err_filename = cwd
                else:
                    err_filename = orig_executable
                if errno_num != 0:
                    err_msg = os.strerror(errno_num)
>               raise child_exception_type(errno_num, err_msg, err_filename)
E               FileNotFoundError: [Errno 2] No such file or directory: 'cpp'

/usr/lib64/python3.12/subprocess.py:1950: FileNotFoundError

During handling of the above exception, another exception occurred:

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')
monkeymodule = <_pytest.monkeypatch.MonkeyPatch object at 0x7fa3e0ffecf0>

    @pytest.fixture(scope="module")
    def external_project(tmp_path_factory, monkeymodule):
        """Generate the documentation for an "external" project and then
        for a "top level" one that uses the first.

        A remote external project is simulated through a mocked `urlopen`
        which returns `REMOTE_MODULES_JSON`

        """

        this_dir = pathlib.Path(__file__).parent
        path = tmp_path_factory.getbasetemp() / "external_project"
        shutil.copytree(this_dir / "../../test_data/external_project", path)

        external_project = path / "external_project"
        top_level_project = path / "top_level_project"

        # Run FORD in the two projects
        # First project has "externalize: True" and will generate JSON dump
        with monkeymodule.context() as m:
            os.chdir(external_project)
            m.setattr(sys, "argv", ["ford", "doc.md"])
>           ford.run()

/ford/test/test_projects/test_external_project.py:97: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/ford/ford/__init__.py:487: in run
    proj_data, proj_docs = initialize()
/ford/ford/__init__.py:138: in initialize
    return parse_arguments(vars(args), proj_docs, proj_data, directory)
/ford/ford/__init__.py:371: in parse_arguments
    exit(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Use exit() or Ctrl-D (i.e. EOF) to exit
code = "Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error:\n    [Err...rocess files, please fix the 'preprocessor' option in 'doc.md'.\nOtherwise, please set 'preprocess: False' in 'doc.md'"

>   ???
E   SystemExit: Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error:
E       [Errno 2] No such file or directory: 'cpp'
E   
E   If you need to preprocess files, please fix the 'preprocessor' option in 'doc.md'.
E   Otherwise, please set 'preprocess: False' in 'doc.md'

<frozen _sitebuiltins>:26: SystemExit
______________ ERROR at setup of test_procedure_module_use_links_ ______________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fa3e1d30980>, _basetemp=PosixPath('/tmp/pytest-of-root/pytest-0'), _retention_count=3, _retention_policy='all')
monkeymodule = <_pytest.monkeypatch.MonkeyPatch object at 0x7fa3e0ffecf0>

    @pytest.fixture(scope="module")
    def external_project(tmp_path_factory, monkeymodule):
        """Generate the documentation for an "external" project and then
        for a "top level" one that uses the first.

        A remote external project is simulated through a mocked `urlopen`
        which returns `REMOTE_MODULES_JSON`

        """

        this_dir = pathlib.Path(__file__).parent
        path = tmp_path_factory.getbasetemp() / "external_project"
>       shutil.copytree(this_dir / "../../test_data/external_project", path)

/ford/test/test_projects/test_external_project.py:87: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.12/shutil.py:588: in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
/usr/lib64/python3.12/shutil.py:486: in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = PosixPath('/tmp/pytest-of-root/pytest-0/external_project'), mode = 511
exist_ok = False

>   ???
E   FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-root/pytest-0/external_project'

<frozen os>:225: FileExistsError
=========================== short test summary info ============================
ERROR test/test_example.py::test_nav_bar - SystemExit: Error: Testing preproc...
ERROR test/test_example.py::test_jumbotron - FileExistsError: [Errno 17] File...
ERROR test/test_example.py::test_developer_info_box - FileExistsError: [Errno...
ERROR test/test_example.py::test_latex - FileExistsError: [Errno 17] File exi...
ERROR test/test_example.py::test_source_file_links - FileExistsError: [Errno ...
ERROR test/test_example.py::test_module_links - FileExistsError: [Errno 17] F...
ERROR test/test_example.py::test_procedures_links - FileExistsError: [Errno 1...
ERROR test/test_example.py::test_types_links - FileExistsError: [Errno 17] Fi...
ERROR test/test_example.py::test_types_type_bound_procedure - FileExistsError...
ERROR test/test_example.py::test_types_constructor_summary - FileExistsError:...
ERROR test/test_example.py::test_types_constructor_page - FileExistsError: [E...
ERROR test/test_example.py::test_types_finaliser - FileExistsError: [Errno 17...
ERROR test/test_example.py::test_graph_submodule - FileExistsError: [Errno 17...
ERROR test/test_example.py::test_procedure_return_value - FileExistsError: [E...
ERROR test/test_example.py::test_info_bar - FileExistsError: [Errno 17] File ...
ERROR test/test_example.py::test_side_panel - FileExistsError: [Errno 17] Fil...
ERROR test/test_example.py::test_variable_lists - FileExistsError: [Errno 17]...
ERROR test/test_example.py::test_deprecated - FileExistsError: [Errno 17] Fil...
ERROR test/test_example.py::test_private_procedure_links - FileExistsError: [...
ERROR test/test_example.py::test_public_procedure_links - FileExistsError: [E...
ERROR test/test_example.py::test_all_internal_links_resolve - FileExistsError...
ERROR test/test_example.py::test_submodule_procedure_implementation_links - F...
ERROR test/test_example.py::test_interfaces - FileExistsError: [Errno 17] Fil...
ERROR test/test_example.py::test_static_pages - FileExistsError: [Errno 17] F...
ERROR test/test_example.py::test_namelist_lists - FileExistsError: [Errno 17]...
ERROR test/test_example.py::test_namelist_page - FileExistsError: [Errno 17] ...
ERROR test/test_example.py::test_linking_to_page_alias_from_nested_page - Fil...
ERROR test/test_projects/test_external_project.py::test_external_project - Sy...
ERROR test/test_projects/test_external_project.py::test_procedure_module_use_links_
=========== 235 passed, 3 skipped, 19 deselected, 29 errors in 6.19s ===========
Error: error building at STEP "RUN python3 -m pytest -vv": error while running runtime: exit status 1
Error: Process completed with exit code 125.
ZedThree commented 11 months ago

I'm not sure this is necessary now?

bkmgit commented 11 months ago

Probably helpful as an example of how to use a different pre-processor - though this can also be done with Ubuntu. Can the choice of pre-processor be specified as a command line option? If so how? Would prefer not to undo your changes and carry patches. Python packages in Fedora need to be in pypi and ideally unbundled, Gfortran is already available, so it would be nice to choose what to use easily.

ZedThree commented 10 months ago

Yep, you can change it with --config='preprocessor="gfortran -E"'