A quick and simple PR preventing the `copy` command to get stuck if you have `commit.gpgSign` and try to run the `copy` command on WIP local project for trial.
Fixes#856Fixes#1224Fixes#616
Co-authored-by: Jairo Llopis <yajo.sk8@gmail.com>
* refactor(tests): add type hints and clean up
* fix: import `Protocol` from `typing-extensions` when using Python 3.7
* fix: import `Literal` from `typing-extensions` when using Python 3.7
* refactor(tests): create template and subproject directory using `tmp_path_factory` fixture
* refactor(tests): use OS-agnostic file path separator
* refactor(tests): use `/` separator for `skip_if_exists` paths
* style: fix formatting error
* refactor(tests): expect POSIX path for local repo URL
* docs: add note to docstring
* feat: print spawn logs on failure, and fix failure in test
The test was failing because it turns out that `tui` won't print letters that must not change, when running an interactive TUI.
I changed the error message for something that will force all letters to change. This way it works as expected.
Co-authored-by: Jairo Llopis <yajo.sk8@gmail.com>
* use a new toolkit for user prompting: questionary (patched).
* multiline questions.
* conditional questions.
* new toolkit for ui tests: pexpect.
* fix lots of tests.
* fix windows builds with newer poetry-dynamic-versioning.
* linters and mypy are now tests, to have faster ci.
* update deprecated ci commands.
* removed dependencies from old times.
* Remove toml 0.5+ syntax (dotted keys)
* Use powershell where syntax is compatible
* Change skip to xfail
* xfail pexpect tests on windows. I'm tired of trying to make it work
* more docs
* possibly something more.
#221 introduced a regression that made the user prompt always display the default value from `copier.yml` file instead of the last answer from `.copier-answers.yml` when the latter one was available.
Here I fix that and test it too. Added a new dev dependency (pytest-timeout) to use it in tests that expect responses from STDIN and for some reason fail to obtain them do not hang in and endless loop.
I also removed the `conftest.py` file, which was only declaring a fixture that is no longer used and can actually be fixed easily using https://stackoverflow.com/a/51893526/1468388.
@Tecnativa TT23705
Fix#89 and fix#89 by adding a new extended syntax to make prompts way more usable.
Leverages plumbum's helpers, so prompt code is removed from Copier codebase, making it smaller BTW.
See README and the new test to understand the new features.
@Tecnativa TT20357