Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #68

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

[pre-commit.ci] auto fixes from pre-commit.com hooks

d88d88d
Select commit
Loading
Failed to load commit list.
Open

[pre-commit.ci] pre-commit autoupdate #68

[pre-commit.ci] auto fixes from pre-commit.com hooks
d88d88d
Select commit
Loading
Failed to load commit list.
Cirrus CI / test (Linux - 3.9) failed Oct 28, 2024 in 1m 3s

Task Summary

Instruction test failed in 00:36

Details

ℹ️ Scheduling was delayed due to a concurrency limit on community tasks

✅ 00:01 clone
✅ 00:09 tox_install
✅ 00:01 prepare
✅ 00:01 clean_workspace
✅ 00:11 build
❌ 00:36 test

----------- generated xml file: /tmp/cirrus-ci-build/junit-test.xml ------------

---------- coverage: platform linux, python 3.9.20-final-0 -----------
Name                                                       Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------------------------------------------
src/pyscaffoldext/custom_extension/__init__.py                 7      1      0      0    86%   13
src/pyscaffoldext/custom_extension/extension.py              101      8     14      4    88%   116-120, 171, 187, 244
src/pyscaffoldext/custom_extension/templates/__init__.py       0      0      0      0   100%
------------------------------------------------------------------------------------------------------
TOTAL                                                        108      9     14      4    88%

============================= slowest 10 durations =============================
11.44s call     tests/test_generated_extension.py::test_generated_extension
1.26s call     tests/test_add_install_requires.py::test_add_install_requires
1.19s call     tests/test_entry_points.py::test_entry_point
1.16s call     tests/test_files.py::test_files
1.07s call     tests/test_custom_extension.py::test_add_custom_extension
0.21s call     tests/test_custom_extension.py::test_add_custom_extension_and_pretend
0.11s call     tests/test_custom_extension.py::test_add_custom_extension_with_namespace
0.07s teardown tests/test_generated_extension.py::test_generated_extension
0.01s teardown tests/test_entry_points.py::test_entry_point
0.01s teardown tests/test_custom_extension.py::test_add_custom_extension
�[36m�[1m=========================== short test summary info ============================�[0m
�[31mFAILED�[0m tests/test_generated_extension.py::�[1mtest_generated_extension�[0m - subprocess.CalledProcessError: Command '['/tmp/cirrus-ci-build/.tox/default...
�[31mFAILED�[0m tests/test_generated_extension.py::�[1mtest_generated_extension_without_prefix�[0m - SystemExit: 2
�[31mFAILED�[0m tests/test_set_default_command.py::�[1mtest_no_skeleton�[0m - SystemExit: 2
�[31mFAILED�[0m tests/test_set_default_command.py::�[1mtest_tox�[0m - SystemExit: 2
�[31mFAILED�[0m tests/test_set_default_command.py::�[1mtest_pre_commit�[0m - SystemExit: 2
�[31m========================= �[31m�[1m5 failed�[0m, �[32m6 passed�[0m�[31m in 17.56s�[0m�[31m =========================�[0m
default: internal error
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/tox/session/cmd/run/single.py", line 48, in _evaluate
    code, outcomes = run_commands(tox_env, no_test)
  File "/usr/local/lib/python3.9/site-packages/tox/session/cmd/run/single.py", line 85, in run_commands
    status_main = run_command_set(tox_env, "commands", chdir, ignore_errors, outcomes)
  File "/usr/local/lib/python3.9/site-packages/tox/session/cmd/run/single.py", line 106, in run_command_set
    current_outcome = tox_env.execute(
  File "/usr/local/lib/python3.9/site-packages/tox/tox_env/api.py", line 391, in execute
    pass  # pragma: no cover
  File "/usr/local/lib/python3.9/contextlib.py", line 126, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.9/site-packages/tox/tox_env/api.py", line 443, in execute_async
    self._log_execute(request, execute_status)
  File "/usr/local/lib/python3.9/site-packages/tox/tox_env/api.py", line 449, in _log_execute
    self._write_execute_log(self.name, self.env_log_dir / f"{self._log_id}-{request.run_id}.log", request, status)
  File "/usr/local/lib/python3.9/site-packages/tox/tox_env/api.py", line 453, in _write_execute_log
    with log_file.open("wt", encoding="utf-8") as file:
  File "/usr/local/lib/python3.9/pathlib.py", line 1252, in open
    return io.open(self, mode, buffering, encoding, errors, newline,
  File "/usr/local/lib/python3.9/pathlib.py", line 1120, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/cirrus-ci-build/.tox/default/log/4-commands[0].log'
  default: FAIL code 2 (35.64 seconds)
  evaluation failed :( (35.79 seconds)

Exit status: 2������

Annotations

Check failure on line 27 in tests/test_generated_extension.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / test (Linux - 3.9)

tests/test_generated_extension.py#L27

tests.test_generated_extension.test_generated_extension
Raw output
tmpfolder = PosixPath('/tmp/pytest-of-root/pytest-0/test_generated_extension0/ae501776-1a91-446e-89ea-0315c000615d')

    @pytest.mark.slow
    @pytest.mark.system
    def test_generated_extension(tmpfolder):
        args = [
            "--no-config",  # <- avoid extra config from dev's machine interference
            "--venv",  # <- generate a venv that we will use to install the project
            "--custom-extension",
            "pyscaffoldext-some_extension",
        ]
    
        cli.main(args)
        with chdir("pyscaffoldext-some_extension"):
            try:
>               run_common_tasks(pre_commit=sys.version_info >= (3, 7))

/tmp/cirrus-ci-build/tests/test_generated_extension.py:27: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/tests/helpers.py:88: in run_common_tasks
    run(f"{PYTHON} -m tox")
/tmp/cirrus-ci-build/tests/helpers.py:73: in run
    return check_output(args, **opts)
/usr/local/lib/python3.9/subprocess.py:424: in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

input = None, capture_output = False, timeout = None, check = True
popenargs = (['/tmp/cirrus-ci-build/.tox/default/bin/python', '-m', 'tox'],)
kwargs = {'encoding': 'utf-8', 'stderr': -2, 'stdout': -1, 'universal_newlines': True}
process = <Popen: returncode: 2 args: ['/tmp/cirrus-ci-build/.tox/default/bin/python',...>
stdout = ".pkg: recreate env because dependencies removed: wheel\n.pkg: remove tox env folder /tmp/cirrus-ci-build/.tox/.pkg\n..../create/via_global_ref/_virtualenv.py'\n  default: FAIL code 2 (6.57 seconds)\n  evaluation failed :( (7.38 seconds)\n"
stderr = None, retcode = 2

    def run(*popenargs,
            input=None, capture_output=False, timeout=None, check=False, **kwargs):
        """Run command with arguments and return a CompletedProcess instance.
    
        The returned instance will have attributes args, returncode, stdout and
        stderr. By default, stdout and stderr are not captured, and those attributes
        will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.
    
        If check is True and the exit code was non-zero, it raises a
        CalledProcessError. The CalledProcessError object will have the return code
        in the returncode attribute, and output & stderr attributes if those streams
        were captured.
    
        If timeout is given, and the process takes too long, a TimeoutExpired
        exception will be raised.
    
        There is an optional argument "input", allowing you to
        pass bytes or a string to the subprocess's stdin.  If you use this argument
        you may not also use the Popen constructor's "stdin" argument, as
        it will be used internally.
    
        By default, all communication is in bytes, and therefore any "input" should
        be bytes, and the stdout and stderr will be bytes. If in text mode, any
        "input" should be a string, and stdout and stderr will be strings decoded
        according to locale encoding, or by "encoding" if set. Text mode is
        triggered by setting any of text, encoding, errors or universal_newlines.
    
        The other arguments are the same as for the Popen constructor.
        """
        if input is not None:
            if kwargs.get('stdin') is not None:
                raise ValueError('stdin and input arguments may not both be used.')
            kwargs['stdin'] = PIPE
    
        if capture_output:
            if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
                raise ValueError('stdout and stderr arguments may not be used '
                                 'with capture_output.')
            kwargs['stdout'] = PIPE
            kwargs['stderr'] = PIPE
    
        with Popen(*popenargs, **kwargs) as process:
            try:
                stdout, stderr = process.communicate(input, timeout=timeout)
            except TimeoutExpired as exc:
                process.kill()
                if _mswindows:
                    # Windows accumulates the output in a single blocking
                    # read() call run on child threads, with the timeout
                    # being done in a join() on those threads.  communicate()
                    # _after_ kill() is required to collect that and add it
                    # to the exception.
                    exc.stdout, exc.stderr = process.communicate()
                else:
                    # POSIX _communicate already populated the output so
                    # far into the TimeoutExpired exception.
                    process.wait()
                raise
            except:  # Including KeyboardInterrupt, communicate handled that.
                process.kill()
                # We don't call process.wait() as .__exit__ does that for us.
                raise
            retcode = process.poll()
            if check and retcode:
>               raise CalledProcessError(retcode, process.args,
                                         output=stdout, stderr=stderr)
E               subprocess.CalledProcessError: Command '['/tmp/cirrus-ci-build/.tox/default/bin/python', '-m', 'tox']' returned non-zero exit status 2.

/usr/local/lib/python3.9/subprocess.py:528: CalledProcessError

Check failure on line 46 in tests/test_generated_extension.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / test (Linux - 3.9)

tests/test_generated_extension.py#L46

tests.test_generated_extension.test_generated_extension_without_prefix
Raw output
tmpfolder = PosixPath('/tmp/pytest-of-root/pytest-0/test_generated_extension_witho0/cdca9a8f-4717-4a51-b437-65722a006ce6')
caplog = <_pytest.logging.LogCaptureFixture object at 0x7fafbf74cc40>

    def test_generated_extension_without_prefix(tmpfolder, caplog):
        caplog.set_level(logging.WARNING)
        # Ensure prefix is added by default
        args = ["--no-config", "--custom-extension", "some_extension"]
        # --no-config: avoid extra config from dev's machine interference
    
>       cli.main(args)

/tmp/cirrus-ci-build/tests/test_generated_extension.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/cli.py:255: in main
    ???
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/cli.py:171: in parse_args
    ???
/usr/local/lib/python3.9/argparse.py:1828: in parse_args
    self.error(msg % ' '.join(argv))
/usr/local/lib/python3.9/argparse.py:2582: in error
    self.exit(2, _('%(prog)s: error: %(message)s\n') % args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = ArgumentParser(prog='pytest', usage=None, description='PyScaffold is a tool for easily putting up the scaffold of a Python project.', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2
message = 'pytest: error: unrecognized arguments: --no-config --custom-extension\n'

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/usr/local/lib/python3.9/argparse.py:2569: SystemExit

Check failure on line 9 in tests/test_set_default_command.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / test (Linux - 3.9)

tests/test_set_default_command.py#L9

tests.test_set_default_command.test_no_skeleton
Raw output
tmpfolder = PosixPath('/tmp/pytest-of-root/pytest-0/test_no_skeleton0/25fc7cf2-6b34-4d6e-94b5-998f24d5713a')

    def test_no_skeleton(tmpfolder):
        args = ["--no-config", "--custom-extension", "pyscaffoldext-some_extension"]
        # --no-config: avoid extra config from dev's machine interference
>       cli.main(args)

/tmp/cirrus-ci-build/tests/test_set_default_command.py:9: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/cli.py:255: in main
    ???
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/cli.py:171: in parse_args
    ???
/usr/local/lib/python3.9/argparse.py:1828: in parse_args
    self.error(msg % ' '.join(argv))
/usr/local/lib/python3.9/argparse.py:2582: in error
    self.exit(2, _('%(prog)s: error: %(message)s\n') % args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = ArgumentParser(prog='pytest', usage=None, description='PyScaffold is a tool for easily putting up the scaffold of a Python project.', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2
message = 'pytest: error: unrecognized arguments: --no-config --custom-extension\n'

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/usr/local/lib/python3.9/argparse.py:2569: SystemExit

Check failure on line 18 in tests/test_set_default_command.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / test (Linux - 3.9)

tests/test_set_default_command.py#L18

tests.test_set_default_command.test_tox
Raw output
tmpfolder = PosixPath('/tmp/pytest-of-root/pytest-0/test_tox0/f49638ca-ffcb-4d1a-971a-86912807eb12')

    def test_tox(tmpfolder):
        args = ["--no-config", "--custom-extension", "pyscaffoldext-some_extension"]
        # --no-config: avoid extra config from dev's machine interference
>       cli.main(args)

/tmp/cirrus-ci-build/tests/test_set_default_command.py:18: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/cli.py:255: in main
    ???
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/cli.py:171: in parse_args
    ???
/usr/local/lib/python3.9/argparse.py:1828: in parse_args
    self.error(msg % ' '.join(argv))
/usr/local/lib/python3.9/argparse.py:2582: in error
    self.exit(2, _('%(prog)s: error: %(message)s\n') % args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = ArgumentParser(prog='pytest', usage=None, description='PyScaffold is a tool for easily putting up the scaffold of a Python project.', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2
message = 'pytest: error: unrecognized arguments: --no-config --custom-extension\n'

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/usr/local/lib/python3.9/argparse.py:2569: SystemExit

Check failure on line 25 in tests/test_set_default_command.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / test (Linux - 3.9)

tests/test_set_default_command.py#L25

tests.test_set_default_command.test_pre_commit
Raw output
tmpfolder = PosixPath('/tmp/pytest-of-root/pytest-0/test_pre_commit0/3cc8cca2-e284-428c-8daa-fbe377ae89eb')

    def test_pre_commit(tmpfolder):
        args = ["--no-config", "--custom-extension", "pyscaffoldext-some_extension"]
        # --no-config: avoid extra config from dev's machine interference
>       cli.main(args)

/tmp/cirrus-ci-build/tests/test_set_default_command.py:25: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/cli.py:255: in main
    ???
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/cli.py:171: in parse_args
    ???
/usr/local/lib/python3.9/argparse.py:1828: in parse_args
    self.error(msg % ' '.join(argv))
/usr/local/lib/python3.9/argparse.py:2582: in error
    self.exit(2, _('%(prog)s: error: %(message)s\n') % args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = ArgumentParser(prog='pytest', usage=None, description='PyScaffold is a tool for easily putting up the scaffold of a Python project.', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2
message = 'pytest: error: unrecognized arguments: --no-config --custom-extension\n'

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/usr/local/lib/python3.9/argparse.py:2569: SystemExit