========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================= test session starts ==========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
platform linux -- Python 3.10.12, pytest-9.0.3, pluggy-1.6.0 -- /usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.10.12', 'Platform': 'Linux-6.8.0-1025-gke-x86_64-with-glibc2.35', 'Packages': {'pytest': '9.0.3', 'pluggy': '1.6.0'}, 'Plugins': {'anyio': '4.13.0', 'mock': '3.15.1', 'metadata': '3.1.1', 'json-report': '1.5.0', 'cov': '7.1.0'}}
rootdir: /workspace/cookiecutter
configfile: setup.cfg
plugins: anyio-4.13.0, mock-3.15.1, metadata-3.1.1, json-report-1.5.0, cov-7.1.0
collected 371 items

tests/replay/test_dump.py::test_type_error_if_no_template_name PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [  0%]
tests/replay/test_dump.py::test_type_error_if_not_dict_context PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [  0%]
tests/replay/test_dump.py::test_value_error_if_key_missing_in_context PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     [  0%]
tests/replay/test_dump.py::test_ioerror_if_replay_dir_creation_fails PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [  1%]
tests/replay/test_dump.py::test_run_json_dump PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             [  1%]
tests/replay/test_load.py::test_type_error_if_no_template_name PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [  1%]
tests/replay/test_load.py::test_value_error_if_key_missing_in_context PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     [  1%]
tests/replay/test_load.py::test_io_error_if_no_replay_file PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [  2%]
tests/replay/test_load.py::test_run_json_load PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             [  2%]
tests/replay/test_replay.py::test_get_replay_file_name[bar] PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               [  2%]
tests/replay/test_replay.py::test_get_replay_file_name[bar.json] PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [  2%]
tests/replay/test_replay.py::test_raise_on_invalid_mode[invalid_kwargs0] PASSED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [  3%]
tests/replay/test_replay.py::test_raise_on_invalid_mode[invalid_kwargs1] FAILED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [  3%]
tests/replay/test_replay.py::test_raise_on_invalid_mode[invalid_kwargs2] PASSED                                                                                                                                                                                                                                                                                                                                                             <response clipped><NOTE>Due to the max output limit, only part of the full response has been shown to you.</NOTE>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   TypeError: unsupported operand type(s) for -: 'str' and 'str'

<template>:1: TypeError
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ test_non_repo_zip_file ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

mocker = <pytest_mock.plugin.MockerFixture object at 0x741aed621600>, clone_dir = PosixPath('/tmp/pytest-of-openhands/pytest-0/test_non_repo_zip_file0/clone_dir')

    def test_non_repo_zip_file(mocker, clone_dir):
        """In `unzip()`, a repository must have a top level directory."""
        mocker.patch(
            'cookiecutter.zipfile.prompt_and_delete', return_value=True, autospec=True
        )

>       with pytest.raises(InvalidZipRepository):
E       Failed: DID NOT RAISE <class 'cookiecutter.exceptions.InvalidZipRepository'>

tests/zipfile/test_unzip.py:145: Failed
============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================ tests coverage ============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ coverage: platform linux, python 3.10.12-final-0 ___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

Name                          Stmts   Miss  Cover   Missing
-----------------------------------------------------------
cookiecutter/__init__.py          6      0   100%
cookiecutter/__main__.py          1      0   100%
cookiecutter/cli.py              71      1    99%   123
cookiecutter/config.py           48      0   100%
cookiecutter/environment.py      17      0   100%
cookiecutter/exceptions.py       23      0   100%
cookiecutter/extensions.py       51      0   100%
cookiecutter/find.py             17      0   100%
cookiecutter/generate.py        163      9    94%   35-36, 123-124, 129, 221, 255-256, 268
cookiecutter/hooks.py            75      0   100%
cookiecutter/log.py              19      0   100%
cookiecutter/main.py             60      5    92%   128-129, 132-133, 136
cookiecutter/prompt.py          158      2    99%   94, 174
cookiecutter/replay.py           28      0   100%
cookiecutter/repository.py       42      2    95%   80, 90
cookiecutter/utils.py            46      7    85%   59-60, 64-68
cookiecutter/vcs.py              53      0   100%
cookiecutter/zipfile.py          47      1    98%   49
-----------------------------------------------------------
TOTAL                           925     27    97%
======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================= short test summary info ========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
FAILED tests/replay/test_replay.py::test_raise_on_invalid_mode[invalid_kwargs1] - cookiecutter.exceptions.RepositoryNotFound: A valid repository for "foo" could not be found in the following locations:
foo
/tmp/pytest-of-openhands/pytest-0/test_raise_on_invalid_mode_inv1/home/.cookiecutters/foo
FAILED tests/test_cli.py::test_echo_undefined_variable_error - assert "Unable to create file '{{cookiecutter.foobar}}'" in ''
 +  where '' = <Result UndefinedError("'collections.OrderedDict object' has no attribute 'foobar'")>.output
FAILED tests/test_cli.py::test_local_extension - assert 1 == 0
 +  where 1 = <Result SystemExit(1)>.exit_code
FAILED tests/test_cli.py::test_debug_list_installed_templates - AssertionError: assert '1 installed templates:' in '7 installed templates:\n  .git\n  .github\n  cookiecutter\n  docs\n  fake-project\n  logo\n  tests\n'
 +  where '7 installed templates:\n  .git\n  .github\n  cookiecutter\n  docs\n  fake-project\n  logo\n  tests\n' = <Result okay>.output
FAILED tests/test_cookiecutter_invocation.py::test_should_invoke_main - subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'cookiecutter.cli', 'tests/fake-repo-tmpl', '--no-input']' returned non-zero exit status 1.
FAILED tests/test_generate_file.py::test_generate_file - AssertionError: assert 'Testing cheese\n' == 'Testing cheese'

  - Testing cheese
  + Testing cheese
  ?               +
FAILED tests/test_generate_file.py::test_generate_file_random_ascii_string[True-10] - assert 11 == 10
 +  where 11 = len("gf'W)]#[b;\n")
FAILED tests/test_generate_file.py::test_generate_file_random_ascii_string[True-40] - AssertionError: assert 41 == 40
 +  where 41 = len('*?qkAtRB(nhgUg`:KIwpN&~_k-@<#]y.]=euhb>E\n')
FAILED tests/test_generate_file.py::test_generate_file_random_ascii_string[False-10] - AssertionError: assert 11 == 10
 +  where 11 = len('oOdTeQSASf\n')
FAILED tests/test_generate_file.py::test_generate_file_random_ascii_string[False-40] - AssertionError: assert 41 == 40
 +  where 41 = len('PjGQogbqCZJRtSwNbCDnkcwZyAzpqWfLmrBnfuDq\n')
FAILED tests/test_generate_file.py::test_generate_file_with_true_condition - AssertionError: assert 'Testing that generate_file was y\n' == 'Testing that generate_file was y'

  - Testing that generate_file was y
  + Testing that generate_file was y
  ?                                 +
FAILED tests/test_generate_file.py::test_generate_file_with_false_condition - IsADirectoryError: [Errno 21] Is a directory: './tests/files/'
FAILED tests/test_generate_file.py::test_generate_file_verbose_template_syntax_error - assert None
 +  where None = <built-in method match of re.Pattern object at 0x5c1bb9c3a8a0>('Missing end of comment tag')
 +    where <built-in method match of re.Pattern object at 0x5c1bb9c3a8a0> = re.compile('Missing end of comment tag\n {2}File "(.[/\\\\])*tests[/\\\\]files[/\\\\]syntax_error.txt", line 1\n {4}I eat {{ syntax_error }} {# this comment is not closed}').match
 +    and   'Missing end of comment tag' = str(TemplateSyntaxError('Missing end of comment tag'))
 +      where TemplateSyntaxError('Missing end of comment tag') = <ExceptionInfo TemplateSyntaxError('Missing end of comment tag') tblen=8>.value
FAILED tests/test_generate_file.py::test_generate_file_does_not_translate_crlf_newlines_to_lf - AssertionError: assert 'newline is CRLF\n' == 'newline is CRLF\r\n'

  - newline is CRLF
  ?                -
  + newline is CRLF
FAILED tests/test_generate_files.py::test_generate_files_with_windows_newline - AssertionError: assert 'newline is CRLF\n' == 'newline is CRLF\r\n'

  - newline is CRLF
  ?                -
  + newline is CRLF
FAILED tests/test_generate_files.py::test_raise_undefined_variable_file_name - jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'foobar'
FAILED tests/test_generate_files.py::test_raise_undefined_variable_file_name_existing_project - jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'foobar'
FAILED tests/test_generate_files.py::test_raise_undefined_variable_dir_name - jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'foobar'
FAILED tests/test_generate_files.py::test_keep_project_dir_on_failure - jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'foobar'
FAILED tests/test_generate_files.py::test_raise_undefined_variable_dir_name_existing_project - jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'foobar'
FAILED tests/test_generate_files.py::test_raise_undefined_variable_project_dir - assert "Unable to create project directory '{{cookiecutter.project_slug}}'" == "Unable to create directory '{{cookiecutter.project_slug}}'"

  - Unable to create directory '{{cookiecutter.project_slug}}'
  + Unable to create project directory '{{cookiecutter.project_slug}}'
  ?                 ++++++++
FAILED tests/test_generate_hooks.py::test_empty_hooks - assert 'shebang' in "Hook script failed (error: [Errno 13] Permission denied: '/tmp/tmp7z2f0d9v.sh')"
 +  where "Hook script failed (error: [Errno 13] Permission denied: '/tmp/tmp7z2f0d9v.sh')" = str(FailedHookException("Hook script failed (error: [Errno 13] Permission denied: '/tmp/tmp7z2f0d9v.sh')"))
 +    where FailedHookException("Hook script failed (error: [Errno 13] Permission denied: '/tmp/tmp7z2f0d9v.sh')") = <ExceptionInfo FailedHookException("Hook script failed (error: [Errno 13] Permission denied: '/tmp/tmp7z2f0d9v.sh')") tblen=6>.value
FAILED tests/test_generate_hooks.py::test_run_failing_hook_preserves_existing_output_directory - AssertionError: assert False
 +  where False = <function exists at 0x741af06c5ea0>('inputhooks')
 +    where <function exists at 0x741af06c5ea0> = <module 'posixpath' from '/usr/lib/python3.10/posixpath.py'>.exists
 +      where <module 'posixpath' from '/usr/lib/python3.10/posixpath.py'> = os.path
FAILED tests/test_prompt.py::TestPrompt::test_prompt_for_config_with_human_prompts[ASCII default prompt/input] - AssertionError: assert OrderedDict([('full_name', 'Your Name'), ('check', ['yes', 'no']), ('nothing', 'ok')]) == {'full_name': 'Your Name', 'check': ['yes', 'no'], 'nothing': 'ok', '__prompts__': {'full_name': 'Name please', 'check': 'Checking'}}

  Common items:
  {'check': ['yes', 'no'], 'full_name': 'Your Name', 'nothing': 'ok'}
  Right contains 1 more item:
  {'__prompts__': {'check': 'Checking', 'full_name': 'Name please'}}

  Full diff:
  + OrderedDict({
  - {
  -     '__prompts__': {
  -         'check': 'Checking',
  -         'full_name': 'Name please',
  -     },
        'check': [
            'yes',
            'no',
        ],
        'full_name': 'Your Name',
        'nothing': 'ok',
  - }
  + })
FAILED tests/test_time_extension.py::test_add_time - arrow.parser.ParserError: Could not parse timezone expression 'utchours=2,seconds=30'.
FAILED tests/test_time_extension.py::test_substract_time - TypeError: unsupported operand type(s) for -: 'str' and 'str'
FAILED tests/test_time_extension.py::test_offset_with_format - TypeError: unsupported operand type(s) for -: 'str' and 'str'
FAILED tests/zipfile/test_unzip.py::test_non_repo_zip_file - Failed: DID NOT RAISE <class 'cookiecutter.exceptions.InvalidZipRepository'>
============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== 28 failed, 339 passed, 4 skipped in 3.48s ===============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
[The command completed with exit code 1.]
[Current working directory: /workspace/cookiecutter]
[Python interpreter: /usr/bin/python]
[Command finished with exit code 1]