[pre-commit.ci] pre-commit autoupdate #58
Cirrus CI / test (Linux - 3.9)
failed
Oct 28, 2024 in 54s
Task Summary
Instruction test failed in 00:32
Details
ℹ️ Scheduling was delayed due to a concurrency limit on community tasks
✅ 00:01 clone
✅ 00:07 tools_install
✅ 00:01 prepare
✅ 00:01 clean_workspace
✅ 00:08 build
❌ 00:32 test
�[1m�[31m/usr/local/lib/python3.9/pathlib.py�[0m:1120: FileNotFoundError
----------- generated xml file: /tmp/cirrus-ci-build/junit-test.xml ------------
---------- coverage: platform linux, python 3.9.17-final-0 -----------
Name Stmts Miss Branch BrPart Cover Missing
----------------------------------------------------------------------------------------------
src/pyscaffoldext/markdown/__init__.py 6 0 0 0 100%
src/pyscaffoldext/markdown/extension.py 75 0 2 0 100%
src/pyscaffoldext/markdown/templates/__init__.py 0 0 0 0 100%
----------------------------------------------------------------------------------------------
TOTAL 81 0 2 0 100%
============================= slowest 10 durations =============================
7.86s call tests/test_custom_extension.py::test_generated_extension
0.24s call tests/test_custom_extension.py::test_add_custom_extension_with_namespace
0.24s call tests/test_custom_extension.py::test_add_custom_extension
0.08s call tests/test_custom_extension.py::test_add_custom_extension_and_pretend
0.05s teardown tests/test_custom_extension.py::test_generated_extension
0.03s call tests/test_markdown.py::test_create_project_with_markdown
0.03s call tests/test_markdown.py::test_cli_with_markdown_and_update
0.01s teardown tests/test_custom_extension.py::test_add_custom_extension_with_namespace
0.01s teardown tests/test_custom_extension.py::test_add_custom_extension
(1 durations < 0.005s hidden. Use -vv to show these durations.)
�[36m�[1m=========================== short test summary info ============================�[0m
�[31mFAILED�[0m tests/test_custom_extension.py::�[1mtest_generated_extension�[0m - subprocess.CalledProcessError: Command '['/tmp/cirrus-ci-build/.tox/default...
�[31mFAILED�[0m tests/test_markdown.py::�[1mtest_create_project_with_markdown�[0m - FileNotFoundError: [Errno 2] No such file or directory: '/tmp/cirrus-ci-bui...
�[31mFAILED�[0m tests/test_markdown.py::�[1mtest_cli_with_markdown_and_update�[0m - FileNotFoundError: [Errno 2] No such file or directory: '/tmp/cirrus-ci-bui...
�[31m========================= �[31m�[1m3 failed�[0m, �[32m4 passed�[0m�[31m in 9.00s�[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 (32.40 seconds)
evaluation failed :( (32.56 seconds)
Exit status: 2������
Annotations
Check failure on line 70 in tests/test_custom_extension.py
cirrus-ci / test (Linux - 3.9)
tests/test_custom_extension.py#L70
tests.test_custom_extension.test_generated_extension
Raw output
tmpfolder = PosixPath('/tmp/pytest-of-root/pytest-0/test_generated_extension0/tmpsw_mh964')
@pytest.mark.slow
@pytest.mark.system
def test_generated_extension(tmpfolder):
use_pre_commit = ["--pre-commit"] if sys.version_info >= (3, 7) else []
args = [
"my_project",
"--no-config", # avoid extra config from dev's machine interference
"--venv", # generate a venv so we can install the resulting project
*use_pre_commit, # ensure generated files respect repository conventions
"--namespace", # it is very easy to forget users might want to use namespaces
"my.ns", # ... so we automatically test the worst case scenario
*EXT_FLAGS,
]
cli.main(args)
with chdir("my_project"):
# Testing a project generated by the custom extension
> run_common_tasks(pre_commit=bool(use_pre_commit))
/tmp/cirrus-ci-build/tests/test_custom_extension.py:70:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/tmp/cirrus-ci-build/tests/helpers.py:87: in run_common_tasks
run(f"{PYTHON} -m tox")
/tmp/cirrus-ci-build/tests/helpers.py:72: 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 = {'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 (4.49 seconds)\n evaluation failed :( (5.18 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 72 in tests/test_markdown.py
cirrus-ci / test (Linux - 3.9)
tests/test_markdown.py#L72
tests.test_markdown.test_create_project_with_markdown
Raw output
tmpfolder = PosixPath('/tmp/pytest-of-root/pytest-0/test_create_project_with_markd0/tmpjdp12f6b')
@pytest.mark.slow
def test_create_project_with_markdown(tmpfolder):
# Given options with the markdown extension,
opts = dict(
project_path="proj",
package="pkg",
version=pyscaffold_version,
extensions=[Markdown()],
config_files=api.NO_CONFIG,
)
# NO_CONFIG: avoid extra config from dev's machine interference
# when the project is created,
> api.create_project(opts)
/tmp/cirrus-ci-build/tests/test_markdown.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/api.py:158: in create_project
???
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/actions.py:100: in invoke
???
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/structure.py:128: in define_structure
???
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/templates/__init__.py:121: in get_template
???
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/templates/__init__.py:26: in read_text
???
/usr/local/lib/python3.9/pathlib.py:1266: in read_text
with self.open(mode='r', encoding=encoding, errors=errors) as f:
/usr/local/lib/python3.9/pathlib.py:1252: in open
return io.open(self, mode, buffering, encoding, errors, newline,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = PosixPath('/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/templates/gitignore.template')
name = '/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/templates/gitignore.template'
flags = 524288, mode = 438
def _opener(self, name, flags, mode=0o666):
# A stub for the opener argument to built-in open()
> return self._accessor.open(self, flags, mode)
E FileNotFoundError: [Errno 2] No such file or directory: '/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/templates/gitignore.template'
/usr/local/lib/python3.9/pathlib.py:1120: FileNotFoundError
Check failure on line 104 in tests/test_markdown.py
cirrus-ci / test (Linux - 3.9)
tests/test_markdown.py#L104
tests.test_markdown.test_cli_with_markdown_and_update
Raw output
tmpfolder = PosixPath('/tmp/pytest-of-root/pytest-0/test_cli_with_markdown_and_upd0/tmpydxhm8u2')
@pytest.mark.slow
@pytest.mark.system
def test_cli_with_markdown_and_update(tmpfolder):
# Given a project exists with the markdown extension
opts = dict(
project_path="proj",
package="pkg",
version=pyscaffold_version,
extensions=[Markdown()],
config_files=api.NO_CONFIG,
)
> api.create_project(opts)
/tmp/cirrus-ci-build/tests/test_markdown.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/api.py:158: in create_project
???
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/actions.py:100: in invoke
???
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/structure.py:128: in define_structure
???
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/templates/__init__.py:121: in get_template
???
/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/templates/__init__.py:26: in read_text
???
/usr/local/lib/python3.9/pathlib.py:1266: in read_text
with self.open(mode='r', encoding=encoding, errors=errors) as f:
/usr/local/lib/python3.9/pathlib.py:1252: in open
return io.open(self, mode, buffering, encoding, errors, newline,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = PosixPath('/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/templates/gitignore.template')
name = '/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/templates/gitignore.template'
flags = 524288, mode = 438
def _opener(self, name, flags, mode=0o666):
# A stub for the opener argument to built-in open()
> return self._accessor.open(self, flags, mode)
E FileNotFoundError: [Errno 2] No such file or directory: '/tmp/cirrus-ci-build/.tox/default/lib/python3.9/site-packages/pyscaffold/templates/gitignore.template'
/usr/local/lib/python3.9/pathlib.py:1120: FileNotFoundError
Loading