[pre-commit.ci] pre-commit autoupdate #68
Task Summary
Instruction test failed in 00:19
Details
ℹ️ Scheduling was delayed due to a concurrency limit on community tasks
✅ 00:01 clone
✅ 00:06 tox_install
✅ 00:01 prepare
✅ 00:01 clean_workspace
✅ 00:06 build
❌ 00:19 test
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 102 8 14 4 88% 116-120, 171, 187, 244
src/pyscaffoldext/custom_extension/templates/__init__.py 0 0 0 0 100%
------------------------------------------------------------------------------------------------------
TOTAL 109 9 14 4 88%
============================= slowest 10 durations =============================
5.31s call tests/test_generated_extension.py::test_generated_extension
0.51s call tests/test_files.py::test_files
0.51s call tests/test_add_install_requires.py::test_add_install_requires
0.44s call tests/test_entry_points.py::test_entry_point
0.43s call tests/test_custom_extension.py::test_add_custom_extension
0.06s teardown tests/test_generated_extension.py::test_generated_extension
0.06s call tests/test_custom_extension.py::test_add_custom_extension_and_pretend
0.02s call tests/test_custom_extension.py::test_add_custom_extension_with_namespace
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 7.98s�[0m�[31m ==========================�[0m
default: internal error
Traceback (most recent call last):
File "/usr/local/lib/python3.11/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.11/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.11/site-packages/tox/session/cmd/run/single.py", line 106, in run_command_set
current_outcome = tox_env.execute(
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tox/tox_env/api.py", line 389, in execute
with self.execute_async(cmd, stdin, show, cwd, run_id, executor) as status:
File "/usr/local/lib/python3.11/contextlib.py", line 144, in __exit__
next(self.gen)
File "/usr/local/lib/python3.11/site-packages/tox/tox_env/api.py", line 443, in execute_async
self._log_execute(request, execute_status)
File "/usr/local/lib/python3.11/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.11/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.11/pathlib.py", line 1044, in open
return io.open(self, mode, buffering, encoding, errors, newline)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/cirrus-ci-build/.tox/default/log/4-commands[0].log'
default: FAIL code 2 (18.89 seconds)
evaluation failed :( (18.95 seconds)
Exit status: 2������
Annotations
Check failure on line 27 in tests/test_generated_extension.py
cirrus-ci / test (Linux - 3.11)
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/729f0f2b-5562-4b4c-89ec-5e11944733d0')
@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.11/subprocess.py:465: 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 (3.53 seconds)\n evaluation failed :( (3.72 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.11/subprocess.py:569: CalledProcessError
Check failure on line 46 in tests/test_generated_extension.py
cirrus-ci / test (Linux - 3.11)
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/71aefd79-f621-4650-ab05-93fe2237c9f7')
caplog = <_pytest.logging.LogCaptureFixture object at 0x7de7be622490>
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.11/site-packages/pyscaffold/cli.py:255: in main
???
/tmp/cirrus-ci-build/.tox/default/lib/python3.11/site-packages/pyscaffold/cli.py:171: in parse_args
???
/usr/local/lib/python3.11/argparse.py:1865: in parse_args
self.error(msg % ' '.join(argv))
/usr/local/lib/python3.11/argparse.py:2617: 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.11/argparse.py:2604: SystemExit
Check failure on line 9 in tests/test_set_default_command.py
cirrus-ci / test (Linux - 3.11)
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/1933526e-0046-4207-8e7a-28059663e246')
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.11/site-packages/pyscaffold/cli.py:255: in main
???
/tmp/cirrus-ci-build/.tox/default/lib/python3.11/site-packages/pyscaffold/cli.py:171: in parse_args
???
/usr/local/lib/python3.11/argparse.py:1865: in parse_args
self.error(msg % ' '.join(argv))
/usr/local/lib/python3.11/argparse.py:2617: 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.11/argparse.py:2604: SystemExit
Check failure on line 18 in tests/test_set_default_command.py
cirrus-ci / test (Linux - 3.11)
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/05daae3d-3698-4902-99fd-73b3f47660c0')
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.11/site-packages/pyscaffold/cli.py:255: in main
???
/tmp/cirrus-ci-build/.tox/default/lib/python3.11/site-packages/pyscaffold/cli.py:171: in parse_args
???
/usr/local/lib/python3.11/argparse.py:1865: in parse_args
self.error(msg % ' '.join(argv))
/usr/local/lib/python3.11/argparse.py:2617: 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.11/argparse.py:2604: SystemExit
Check failure on line 25 in tests/test_set_default_command.py
cirrus-ci / test (Linux - 3.11)
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/dac13323-bc25-4f2c-8222-38ce3200971a')
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.11/site-packages/pyscaffold/cli.py:255: in main
???
/tmp/cirrus-ci-build/.tox/default/lib/python3.11/site-packages/pyscaffold/cli.py:171: in parse_args
???
/usr/local/lib/python3.11/argparse.py:1865: in parse_args
self.error(msg % ' '.join(argv))
/usr/local/lib/python3.11/argparse.py:2617: 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.11/argparse.py:2604: SystemExit