<86>Aug 30 10:52:52 userdel[2395369]: delete user 'rooter' <86>Aug 30 10:52:52 userdel[2395369]: removed group 'rooter' owned by 'rooter' <86>Aug 30 10:52:52 userdel[2395369]: removed shadow group 'rooter' owned by 'rooter' <86>Aug 30 10:52:52 groupadd[2395376]: group added to /etc/group: name=rooter, GID=1841 <86>Aug 30 10:52:52 groupadd[2395376]: group added to /etc/gshadow: name=rooter <86>Aug 30 10:52:52 groupadd[2395376]: new group: name=rooter, GID=1841 <86>Aug 30 10:52:52 useradd[2395382]: new user: name=rooter, UID=1841, GID=1841, home=/root, shell=/bin/bash, from=none <86>Aug 30 10:52:52 userdel[2395399]: delete user 'builder' <86>Aug 30 10:52:52 userdel[2395399]: removed group 'builder' owned by 'builder' <86>Aug 30 10:52:52 userdel[2395399]: removed shadow group 'builder' owned by 'builder' <86>Aug 30 10:52:52 groupadd[2395406]: group added to /etc/group: name=builder, GID=1842 <86>Aug 30 10:52:52 groupadd[2395406]: group added to /etc/gshadow: name=builder <86>Aug 30 10:52:52 groupadd[2395406]: new group: name=builder, GID=1842 <86>Aug 30 10:52:52 useradd[2395416]: new user: name=builder, UID=1842, GID=1842, home=/usr/src, shell=/bin/bash, from=none <13>Aug 30 10:52:55 rpmi: libmpdec3-2.5.1-alt3 sisyphus+314490.500.5.1 1675432033 installed <13>Aug 30 10:52:55 rpmi: libgdbm-1.8.3-alt10 sisyphus+346222.200.3.2 1716468406 installed <13>Aug 30 10:52:55 rpmi: libexpat-2.7.1-alt1 sisyphus+379929.100.1.1 1743519386 installed <13>Aug 30 10:52:55 rpmi: openssl-config-3.2.0-alt1 sisyphus+366659.140.4.1 1736956949 installed <13>Aug 30 10:52:55 rpmi: libb2-0.98.1-alt1_1 sisyphus+291614.100.1.1 1638962878 installed <13>Aug 30 10:52:55 rpmi: libp11-kit-1:0.25.5-alt1 sisyphus+352553.100.1.1 1720622586 installed <13>Aug 30 10:52:55 rpmi: libtasn1-4.20.0-alt2 sisyphus+375829.100.1.1 1740299335 installed <13>Aug 30 10:52:55 rpmi: rpm-macros-alternatives-0.5.3-alt1 sisyphus+371878.100.1.1 1737988822 installed <13>Aug 30 10:52:55 rpmi: alternatives-0.5.3-alt1 sisyphus+371878.100.1.1 1737988822 installed <13>Aug 30 10:52:55 rpmi: ca-certificates-2025.07.29-alt1 sisyphus+391139.200.2.1 1753801312 installed <13>Aug 30 10:52:55 rpmi: ca-trust-0.2.0-alt1 sisyphus+344843.100.1.1 1712743326 installed <13>Aug 30 10:52:55 rpmi: p11-kit-trust-1:0.25.5-alt1 sisyphus+352553.100.1.1 1720622586 installed <13>Aug 30 10:52:55 rpmi: libcrypto3-3.3.3-alt1 sisyphus+374381.40.2.1 1739299702 installed <13>Aug 30 10:52:55 rpmi: libssl3-3.3.3-alt1 sisyphus+374381.40.2.1 1739299702 installed <13>Aug 30 10:52:55 rpmi: python3-3.12.11-alt1 sisyphus+389751.100.1.1 1752340611 installed <13>Aug 30 10:52:56 rpmi: python3-base-3.12.11-alt1 sisyphus+389751.100.1.1 1752340611 installed <13>Aug 30 10:52:56 rpmi: python3-module-py3dephell-0.3.1-alt1 sisyphus+365261.200.1.1 1734463433 installed <13>Aug 30 10:52:56 rpmi: python3-module-pyproject-installer-0.5.5-alt2 sisyphus+366395.100.1.1 1735032014 installed <13>Aug 30 10:52:56 rpmi: rpm-macros-pyproject-0.1.0-alt1 sisyphus+391654.140.2.1 1754483464 installed <13>Aug 30 10:52:56 rpmi: tests-for-installed-python3-pkgs-0.1.28-alt1 sisyphus+375953.100.2.1 1740855713 installed <13>Aug 30 10:52:56 rpmi: rpm-build-python3-0.1.28-alt1 sisyphus+375953.100.2.1 1740855713 installed <13>Aug 30 10:52:56 rpmi: rpm-build-pyproject-0.1.0-alt1 sisyphus+391654.140.2.1 1754483464 installed <13>Aug 30 10:53:00 rpmi: python3-module-packaging-25.0-alt1 sisyphus+382195.100.1.1 1745223121 installed <13>Aug 30 10:53:00 rpmi: python3-module-typing_extensions-4.14.1-alt1 sisyphus+389153.100.1.1 1751831689 installed <13>Aug 30 10:53:00 rpmi: python3-module-system-seed-wheels-0.0.2-alt1 sisyphus+384227.200.3.1 1747487299 installed <13>Aug 30 10:53:00 rpmi: python3-module-platformdirs-4.3.8-alt1 sisyphus+384104.100.2.1 1747728597 installed <13>Aug 30 10:53:00 rpmi: python3-module-more-itertools-10.7.0-alt1 sisyphus+384072.100.2.1 1747647538 installed <13>Aug 30 10:53:00 rpmi: python3-module-wcwidth-0.2.13-alt1 sisyphus+341792.100.2.1 1709543329 installed <13>Aug 30 10:53:00 rpmi: libtcl-8.6.13-alt1 sisyphus+310696.100.1.1 1669548256 installed <13>Aug 30 10:53:00 rpmi: libjpeg-2:3.0.2-alt2.1 sisyphus+340135.100.1.1 1707449053 installed <13>Aug 30 10:53:00 rpmi: libidn2-2.3.8-alt1 sisyphus+393466.100.1.1 1756397195 installed <13>Aug 30 10:53:00 rpmi: libnettle8-3.10.1-alt1 sisyphus+372008.100.1.1 1738078268 installed <13>Aug 30 10:53:00 rpmi: python3-module-jaraco.functools-4.3.0-alt1 sisyphus+392842.100.1.1 1755620367 installed <13>Aug 30 10:53:00 rpmi: python3-module-traitlets-5.14.3-alt1 sisyphus+345559.100.1.1 1713606266 installed <13>Aug 30 10:53:00 rpmi: python3-module-pluggy-1.6.0-alt1 sisyphus+384666.100.2.1 1747813604 installed <13>Aug 30 10:53:00 rpmi: python3-module-fastjsonschema-2.21.1-alt1 sisyphus+363956.100.1.1 1733217943 installed <13>Aug 30 10:53:00 rpmi: python3-module-cleo-2.2.1-alt1 sisyphus+362876.200.1.1 1731956909 installed <13>Aug 30 10:53:00 rpmi: python3-module-urllib3-2:2.5.0-alt1 sisyphus+387543.100.2.1 1750405108 installed <13>Aug 30 10:53:00 rpmi: python3-module-decorator-5.2.1-alt1 sisyphus+376067.100.1.1 1740491622 installed <13>Aug 30 10:53:00 rpmi: python3-module-Pygments-2.19.2-alt1 sisyphus+387997.100.1.1 1750689871 installed <13>Aug 30 10:53:00 rpmi: libwebp7-1.6.0-alt1.1 sisyphus+391653.100.1.1 1754310208 installed <13>Aug 30 10:53:00 rpmi: libopenblas-0.3.30-alt1 sisyphus+387628.100.1.1 1750361104 installed <13>Aug 30 10:53:00 rpmi: python3-module-ipython-pygments-lexers-1.1.1-alt1 sisyphus+377149.100.4.1 1741352254 installed <13>Aug 30 10:53:00 rpmi: libhogweed6-3.10.1-alt1 sisyphus+372008.100.1.1 1738078268 installed <13>Aug 30 10:53:00 rpmi: libgnutls30-3.8.10-alt1 sisyphus+389369.200.1.1 1752083137 installed <13>Aug 30 10:53:00 rpmi: libngtcp2.16-1.13.0-alt1 sisyphus+386006.100.1.2 1748688254 installed <13>Aug 30 10:53:00 rpmi: libngtcp2_crypto_gnutls8-1.13.0-alt1 sisyphus+386006.100.1.2 1748688254 installed <13>Aug 30 10:53:00 rpmi: libyuv-0.0.1874-alt1 sisyphus+326054.40.2.1 1690679429 installed <13>Aug 30 10:53:00 rpmi: tcl-8.6.13-alt1 sisyphus+310696.100.1.1 1669548256 installed <13>Aug 30 10:53:00 rpmi: python3-module-prettytable-2.1.0-alt1 sisyphus+269172.200.1.1 1617824839 installed <13>Aug 30 10:53:00 rpmi: python3-module-pip-wheel-25.2-alt1 sisyphus+391268.200.2.1 1753966931 installed <13>Aug 30 10:53:01 rpmi: python3-module-setuptools-wheel-1:80.9.0-alt1 sisyphus+385748.100.2.1 1748862289 installed <13>Aug 30 10:53:01 rpmi: python3-module-system-seed-wheels-wheels-0.0.2-alt1 sisyphus+384227.200.3.1 1747487299 installed <13>Aug 30 10:53:01 rpmi: python3-module-pydantic-core-2.33.2-alt1 sisyphus+383374.100.3.1 1746561261 installed <13>Aug 30 10:53:01 rpmi: python3-module-typing-inspection-0.4.1-alt1 sisyphus+386814.300.2.1 1749543502 installed <13>Aug 30 10:53:01 rpmi: python3-module-findpython-0.6.2-alt1 sisyphus+365393.2100.1.1 1734632146 installed <13>Aug 30 10:53:01 rpmi: python3-module-wheel-0.45.1-alt4 sisyphus+384227.100.3.1 1747487276 installed <13>Aug 30 10:53:01 rpmi: python3-module-tomlkit-0.13.3-alt1 sisyphus+386334.100.1.1 1749110665 installed <13>Aug 30 10:53:01 rpmi: python3-module-shellingham-1.5.4-alt1 sisyphus+332574.100.1.1 1698135363 installed <13>Aug 30 10:53:01 rpmi: python3-module-tomli-2.2.1-alt1 sisyphus+363592.100.1.1 1732803942 installed <13>Aug 30 10:53:01 rpmi: python3-module-poetry-alt-namespace-0.0.1-alt1 sisyphus+306728.100.1.1 1663083685 installed <13>Aug 30 10:53:01 rpmi: python3-module-pkginfo-1.12.1.2-alt2 sisyphus+375489.100.1.1 1740064345 installed <13>Aug 30 10:53:01 rpmi: python3-module-ptyprocess-0.7.0-alt1 sisyphus+283469.100.1.1 1629400504 installed <13>Aug 30 10:53:01 rpmi: python3-module-pbs-installer-2024.10.16-alt1 sisyphus+365393.1400.4.1 1734644011 installed <13>Aug 30 10:53:01 rpmi: python3-module-pastel-0.2.0-alt1 sisyphus+299486.100.1.1 1651725268 installed <13>Aug 30 10:53:01 rpmi: python3-module-lark-1.2.2-alt1 sisyphus+358322.100.1.1 1727258177 installed <13>Aug 30 10:53:01 rpmi: python3-module-poetry-core-2.1.3-alt1 sisyphus+384073.100.2.1 1747393124 installed <13>Aug 30 10:53:01 rpmi: python3-module-testpath-0.6.0-alt2 sisyphus+309123.500.4.1 1668095372 installed <13>Aug 30 10:53:01 rpmi: python3-module-pure-eval-0.2.3-alt1 sisyphus+353357.100.1.1 1721650016 installed <13>Aug 30 10:53:01 rpmi: python3-module-pyogg-0.6.14-alt1 sisyphus+367505.100.1.1 1735845349 installed <13>Aug 30 10:53:01 rpmi: python3-module-pyglet-1.5.30-alt1 sisyphus+367527.100.1.1 1735927191 installed <13>Aug 30 10:53:01 rpmi: python3-module-pyperclip-1.9.0-alt1 sisyphus+353859.100.1.1 1722231798 installed <13>Aug 30 10:53:01 rpmi: python3-module-pygobject3-nox-3.52.3-alt1 sisyphus+378334.100.1.1 1742236126 installed <13>Aug 30 10:53:01 rpmi: python3-module-pickleshare-0.7.5-alt3 sisyphus+339447.100.1.1 1706675898 installed <13>Aug 30 10:53:01 rpmi: python3-module-matplotlib-data-3.10.5-alt1 sisyphus+391597.100.1.1 1754198837 installed <13>Aug 30 10:53:01 rpmi: python3-module-railroad-diagrams-3.0.1-alt1 sisyphus+358318.100.1.1 1727257812 installed <13>Aug 30 10:53:01 rpmi: python3-module-markupsafe-1:3.0.2-alt1 sisyphus+360209.100.1.1 1729323052 installed <13>Aug 30 10:53:01 rpmi: python3-module-jinja2-3.1.6-alt1 sisyphus+377889.1500.2.1 1742249941 installed <13>Aug 30 10:53:01 rpmi: python3-module-pyparsing-3.2.3-alt1 sisyphus+379206.100.2.1 1742978787 installed <13>Aug 30 10:53:01 rpmi: python3-module-kiwisolver-1.4.9-alt1 sisyphus+392337.100.1.1 1755077518 installed <13>Aug 30 10:53:01 rpmi: python3-module-installer-0.7.0-alt1 sisyphus+318881.100.2.1 1681988183 installed <13>Aug 30 10:53:01 rpmi: python3-module-iniconfig-2.1.0-alt1 sisyphus+378658.100.2.1 1742493599 installed <13>Aug 30 10:53:01 rpmi: python3-module-pytest-8.3.5-alt3 sisyphus+385748.200.2.1 1748862411 installed <13>Aug 30 10:53:01 rpmi: python3-module-jaraco.context-6.0.1-alt1.1 sisyphus+376369.6200.10.1 1746628448 installed <13>Aug 30 10:53:01 rpmi: python3-module-trove-classifiers-2025.8.6.13-alt1 sisyphus+391890.100.1.1 1754641841 installed <13>Aug 30 10:53:01 rpmi: python3-module-pathspec-0.12.1-alt1 sisyphus+341971.100.1.1 1709553025 installed <13>Aug 30 10:53:01 rpmi: python3-module-hatchling-1.27.0-alt1 sisyphus+365115.100.2.1 1734340769 installed <13>Aug 30 10:53:01 rpmi: python3-module-filelock-3.18.0-alt1 sisyphus+377927.100.2.1 1741959375 installed <13>Aug 30 10:53:01 rpmi: python3-module-executing-2.2.0-alt1 sisyphus+370911.100.1.1 1737575455 installed <13>Aug 30 10:53:01 rpmi: python3-module-pyasn1-0.6.1-alt1 sisyphus+357301.100.1.1 1740397762 installed <13>Aug 30 10:53:01 rpmi: python3-module-zope.interface-7.2-alt2 sisyphus+391860.200.1.1 1754585549 installed <13>Aug 30 10:53:01 rpmi: python3-module-zope-3.3.0-alt10 sisyphus+391860.100.1.1 1754585510 installed <13>Aug 30 10:53:01 rpmi: python3-module-zope.event-5.1.1-alt1 sisyphus+390493.100.1.1 1753170288 installed <13>Aug 30 10:53:01 rpmi: python3-module-psutil-7.0.0-alt1 sisyphus+378483.100.1.1 1742330008 installed <13>Aug 30 10:53:01 rpmi: python3-module-objgraph-3.6.2-alt1 sisyphus+359468.100.1.1 1728573508 installed <13>Aug 30 10:53:01 rpmi: python3-module-greenlet-3.2.4-alt1 sisyphus+392843.100.1.1 1755621591 installed <13>Aug 30 10:53:01 rpmi: python3-module-fastimport-0.9.14-alt2 sisyphus+318148.100.1.1 1680797712 installed <13>Aug 30 10:53:02 rpmi: python3-module-docutils-0.21.2-alt1 sisyphus+387307.100.1.1 1750073841 installed <13>Aug 30 10:53:02 rpmi: python3-module-distlib-0.4.0-alt1 sisyphus+390107.100.1.1 1752827195 installed <13>Aug 30 10:53:02 rpmi: python3-module-virtualenv-20.33.1-alt1 sisyphus+391755.100.2.1 1754471856 installed <13>Aug 30 10:53:02 rpmi: python3-module-six-1.17.0-alt1.1 sisyphus+373470.100.1.1 1738920023 installed <13>Aug 30 10:53:02 rpmi: python3-module-dateutil-2.9.0.post0-alt1 sisyphus+378451.100.1.1 1742313746 installed <13>Aug 30 10:53:02 rpmi: python3-module-cycler-0.12.1-alt1 sisyphus+331222.100.1.1 1696668651 installed <13>Aug 30 10:53:02 rpmi: python3-module-idna-3.10-alt1 sisyphus+358681.100.1.1 1727701241 installed <13>Aug 30 10:53:02 rpmi: python3-module-charset-normalizer-3.2.0-alt1 sisyphus+347396.200.2.1 1714733144 installed <13>Aug 30 10:53:02 rpmi: python3-module-requests-2.32.4-alt1 sisyphus+386815.100.1.1 1749543206 installed <13>Aug 30 10:53:02 rpmi: python3-module-msgpack-1.1.0-alt1 sisyphus+366518.100.1.1 1735151210 installed <13>Aug 30 10:53:02 rpmi: python3-module-cachecontrol-0.14.3-alt1 sisyphus+382958.100.1.1 1746052463 installed <13>Aug 30 10:53:02 rpmi: python3-module-pyproject_hooks-1.2.0-alt1 sisyphus+386406.100.1.1 1749203250 installed <13>Aug 30 10:53:02 rpmi: python3-module-build-1.3.0-alt1 sisyphus+391710.100.1.1 1754387087 installed <13>Aug 30 10:53:02 rpmi: python3-module-bson-4.13.2-alt1 sisyphus+388266.100.1.1 1750938679 installed <13>Aug 30 10:53:02 rpmi: python3-module-bottle-1:0.12.25-alt1 sisyphus+316623.100.1.1 1678651894 installed <13>Aug 30 10:53:02 rpmi: python3-module-autocommand-2.2.2-alt1.1 sisyphus+339714.100.1.1 1706968174 installed <13>Aug 30 10:53:02 rpmi: python3-module-jaraco.text-4.0.0-alt1.1 sisyphus+376369.7300.10.1 1746628739 installed <13>Aug 30 10:53:02 rpmi: python3-module-pkg_resources-1:80.9.0-alt1 sisyphus+385748.100.2.1 1748862289 installed <13>Aug 30 10:53:02 rpmi: python3-module-attrs-25.3.0-alt1 sisyphus+378700.100.1.1 1742472992 installed <13>Aug 30 10:53:02 rpmi: python3-module-pycryptodome-3.23.0-alt1 sisyphus+384624.100.1.1 1747676980 installed <13>Aug 30 10:53:02 rpmi: python3-module-asttokens-3.0.0-alt1 sisyphus+363799.100.1.1 1733123348 installed <13>Aug 30 10:53:02 rpmi: python3-module-stack-data-0.6.3-alt2 sisyphus+380649.100.1.1 1743970069 installed <13>Aug 30 10:53:02 rpmi: python3-module-argcomplete-3.6.2-alt1 sisyphus+380100.100.1.1 1743688705 installed <13>Aug 30 10:53:02 rpmi: python3-module-annotated-types-0.7.0-alt1 sisyphus+349932.100.1.1 1717043663 installed <13>Aug 30 10:53:02 rpmi: python3-module-olefile-0.47-alt2 sisyphus+388172.100.1.1 1750862336 installed <13>Aug 30 10:53:02 rpmi: python3-module-pycparser-2.22-alt1 sisyphus+378485.100.1.1 1742331206 installed <13>Aug 30 10:53:02 rpmi: python3-module-cffi-1.17.1-alt1 sisyphus+357396.100.1.1 1726156488 installed <13>Aug 30 10:53:02 rpmi: python3-module-cryptography-45.0.3-alt1 sisyphus+385433.100.1.1 1748335046 installed <13>Aug 30 10:53:02 rpmi: python3-module-openssl-25.1.0-alt1.1 sisyphus+385463.100.1.1 1748349146 installed <13>Aug 30 10:53:02 rpmi: python3-module-requests_toolbelt-1.0.0-alt3 sisyphus+338996.100.1.1 1706201427 installed <13>Aug 30 10:53:02 rpmi: python3-module-service_identity-24.2.0-alt1 sisyphus+362235.100.1.1 1731336596 installed <13>Aug 30 10:53:02 rpmi: python3-module-pymongo-4.13.2-alt1 sisyphus+388266.100.1.1 1750938679 installed <13>Aug 30 10:53:02 rpmi: python3-module-servicemanager-2.0.7-alt1 sisyphus+275998.100.1.1 1624811123 installed <13>Aug 30 10:53:02 rpmi: python3-module-execnet-2.1.1-alt1 sisyphus+344737.100.1.1 1712657795 installed <13>Aug 30 10:53:03 rpmi: mercurial-7.0.1-alt1 sisyphus+382790.100.2.2 1746550278 installed <13>Aug 30 10:53:03 rpmi: libyaml2-6.0.2-alt1 sisyphus+393301.100.1.1 1756210811 installed <13>Aug 30 10:53:03 rpmi: python3-module-yaml-6.0.2-alt1.1 sisyphus+376369.16600.10.1 1746631133 installed <13>Aug 30 10:53:03 rpmi: libuv-1.51.0-alt1 sisyphus+385298.100.1.1 1748165546 installed <13>Aug 30 10:53:03 rpmi: libsqlite3-3.50.4-alt1 sisyphus+391668.100.1.1 1754321138 installed <13>Aug 30 10:53:03 rpmi: python3-modules-sqlite3-3.12.11-alt1 sisyphus+389751.100.1.1 1752340611 installed <13>Aug 30 10:53:03 rpmi: libqhull-2020.2-alt2 sisyphus+384239.100.1.1 1747324502 installed <13>Aug 30 10:53:03 rpmi: libpython3-3.12.11-alt1 sisyphus+389751.100.1.1 1752340611 installed <13>Aug 30 10:53:03 rpmi: libopenjpeg2.0-2.5.3-alt1 sisyphus+376290.11300.24.2 1745385930 installed <13>Aug 30 10:53:03 rpmi: libncurses6-6.5.20250705-alt1 sisyphus+389752.100.1.1 1752343201 installed <13>Aug 30 10:53:03 rpmi: libtinfo-devel-6.5.20250705-alt1 sisyphus+389752.100.1.1 1752343201 installed <13>Aug 30 10:53:03 rpmi: libncurses-devel-6.5.20250705-alt1 sisyphus+389752.100.1.1 1752343201 installed <13>Aug 30 10:53:04 rpmi: python3-dev-3.12.11-alt1 sisyphus+389751.100.1.1 1752340611 installed <13>Aug 30 10:53:04 rpmi: python3-module-setuptools-1:80.9.0-alt1 sisyphus+385748.100.2.1 1748862289 installed <13>Aug 30 10:53:04 rpmi: liblcms2-2.17-alt1 sisyphus+376290.10700.24.2 1745384016 installed <13>Aug 30 10:53:04 rpmi: libxblas-1.0.248-alt2 sisyphus+285045.40.2.1 1631388462 installed <13>Aug 30 10:53:04 rpmi: libgomp1-14.3.1-alt1 sisyphus+393196.100.1.1 1756067420 installed <13>Aug 30 10:53:04 rpmi: libimagequant-2.17.0-alt1_1 sisyphus+291138.100.1.1 1638394107 installed <13>Aug 30 10:53:04 rpmi: libquadmath0-14.3.1-alt1 sisyphus+393196.100.1.1 1756067420 installed <13>Aug 30 10:53:04 rpmi: libgfortran5-14.3.1-alt1 sisyphus+393196.100.1.1 1756067420 installed <13>Aug 30 10:53:04 rpmi: liblapack-1:3.8.0-alt9 sisyphus+390064.100.1.1 1752950825 installed <13>Aug 30 10:53:05 rpmi: python3-module-numpy-1:2.3.2-alt1 sisyphus+389974.60.16.1 1754912288 installed <13>Aug 30 10:53:05 rpmi: libev4-4.33-alt3 sisyphus+334335.340.4.1 1699912675 installed <13>Aug 30 10:53:05 rpmi: libdeflate-1.24-alt1 sisyphus+384095.100.1.1 1747211181 installed <13>Aug 30 10:53:05 rpmi: libtiff6-4.7.0-alt3 sisyphus+391886.40.2.1 1754666875 installed <13>Aug 30 10:53:05 rpmi: libcares-1.34.5-alt2 sisyphus+391022.100.2.1 1754129761 installed <13>Aug 30 10:53:05 rpmi: python3-module-gevent-24.11.1-alt1 sisyphus+378463.100.2.1 1742318310 installed <13>Aug 30 10:53:05 rpmi: python3-module-dulwich-0.22.7-alt1 sisyphus+370833.300.3.1 1737546704 installed <13>Aug 30 10:53:05 rpmi: python3-module-poetry-2.1.4-alt1 sisyphus+391701.100.1.1 1754383663 installed <13>Aug 30 10:53:05 rpmi: librav1e-0.8.1-alt1 sisyphus+387368.100.1.1 1750149808 installed <13>Aug 30 10:53:05 rpmi: libdav1d_7-1.5.1-alt1 sisyphus+375116.100.1.1 1739813289 installed <13>Aug 30 10:53:05 rpmi: libavif-1.3.0-alt2 sisyphus+385438.100.1.1 1748337591 installed <13>Aug 30 10:53:05 rpmi: libpng16-1.6.50-alt1 sisyphus+388718.100.1.1 1751445251 installed <13>Aug 30 10:53:05 rpmi: libgraphite2-1.3.14-alt2.1 sisyphus+279571.100.1.2 1626605157 installed <13>Aug 30 10:53:05 rpmi: libXdmcp-1.1.5-alt1 sisyphus+343583.700.1.1 1711441073 installed <13>Aug 30 10:53:05 rpmi: libXau-1.0.11-alt1 sisyphus+311428.100.1.1 1670577440 installed <13>Aug 30 10:53:05 rpmi: libxcb-1.17.0-alt1 sisyphus+345308.200.1.1 1713342009 installed <13>Aug 30 10:53:05 rpmi: libX11-locales-3:1.8.11-alt1 sisyphus+373040.100.1.1 1738571640 installed <13>Aug 30 10:53:05 rpmi: libX11-3:1.8.11-alt1 sisyphus+373040.100.1.1 1738571643 installed <13>Aug 30 10:53:05 rpmi: libXrender-0.9.12-alt1 sisyphus+373121.100.1.1 1738654919 installed <13>Aug 30 10:53:05 rpmi: libssh2-1.11.0-alt2 sisyphus+339356.100.1.1 1706593140 installed <13>Aug 30 10:53:05 rpmi: publicsuffix-list-dafsa-20250827-alt1 sisyphus+393384.100.1.1 1756311112 installed <13>Aug 30 10:53:05 rpmi: libpsl-0.21.5-alt1 sisyphus+338474.100.1.1 1705684771 installed <13>Aug 30 10:53:05 rpmi: libnghttp3.9-1.10.1-alt1 sisyphus+386004.100.1.1 1748687338 installed <13>Aug 30 10:53:05 rpmi: libnghttp2-1.66.0-alt1 sisyphus+387616.100.1.1 1750348650 installed <13>Aug 30 10:53:05 rpmi: openldap-common-2.6.9-alt2 sisyphus+367501.300.4.1 1735841751 installed <13>Aug 30 10:53:05 rpmi: libntlm-1.5-alt2 sisyphus+379810.500.4.1 1743501149 installed <13>Aug 30 10:53:05 rpmi: libidn-1.37-alt2 sisyphus+300849.100.1.1 1653769693 installed <13>Aug 30 10:53:05 rpmi: libbrotlicommon-1.1.0-alt1 sisyphus+328501.100.1.1 1693598420 installed <13>Aug 30 10:53:05 rpmi: libbrotlidec-1.1.0-alt1 sisyphus+328501.100.1.1 1693598420 installed <13>Aug 30 10:53:05 rpmi: libharfbuzz-11.4.3-alt1 sisyphus+393171.100.1.1 1755971433 installed <13>Aug 30 10:53:05 rpmi: libfreetype-2.13.3-alt1 sisyphus+355656.100.1.1 1724221065 installed <13>Aug 30 10:53:05 rpmi: libfontconfig1-2.17.1-alt1 sisyphus+393436.100.1.1 1756377931 installed <13>Aug 30 10:53:05 rpmi: libXft-2.3.8-alt1 sisyphus+331490.400.1.1 1697023273 installed <13>Aug 30 10:53:05 rpmi: libtk-8.6.13-alt1 sisyphus+310696.200.1.1 1669548528 installed <13>Aug 30 10:53:05 rpmi: tk-8.6.13-alt1 sisyphus+310696.200.1.1 1669548528 installed <13>Aug 30 10:53:05 rpmi: tcl-tix-8.4.3-alt5 sisyphus+371748.200.2.1 1738070356 installed <13>Aug 30 10:53:05 rpmi: python3-modules-tkinter-3.12.11-alt1 sisyphus+389751.100.1.1 1752340611 installed <13>Aug 30 10:53:06 rpmi: python3-module-Pillow-11.3.0-alt1 sisyphus+388719.100.1.1 1751446186 installed <13>Aug 30 10:53:06 rpmi: python3-module-mpl_toolkits-3.10.5-alt1 sisyphus+391597.100.1.1 1754198846 installed <13>Aug 30 10:53:06 rpmi: python3-module-matplotlib-3.10.5-alt1 sisyphus+391597.100.1.1 1754198846 installed <13>Aug 30 10:53:06 rpmi: python3-module-matplotlib-inline-0.1.7-alt2 sisyphus+374260.100.2.1 1741201733 installed <13>Aug 30 10:53:06 rpmi: libxxhash-0.8.3-alt1 sisyphus+384704.100.1.1 1747741286 installed <13>Aug 30 10:53:06 rpmi: liblz4-1:1.9.4-alt1 sisyphus+309416.100.1.1 1667413000 installed <13>Aug 30 10:53:06 rpmi: rsync-3.2.7-alt3 sisyphus+372266.100.1.1 1738342244 installed <13>Aug 30 10:53:06 rpmi: openssh-common-9.6p1-alt4 sisyphus+393310.300.4.1 1756289039 installed <13>Aug 30 10:53:06 rpmi: libverto-0.3.2-alt1_1 sisyphus+321176.2200.10.2 1684806164 installed <13>Aug 30 10:53:06 rpmi: liblmdb-0.9.33-alt1 sisyphus+360625.100.1.1 1729819639 installed <13>Aug 30 10:53:06 rpmi: libkeyutils-1.6.3-alt1 sisyphus+346336.200.2.2 1716472658 installed <13>Aug 30 10:53:06 rpmi: libcom_err-1.47.1.0.10.ad56-alt2 sisyphus+363497.200.3.1 1732729916 installed <86>Aug 30 10:53:06 groupadd[2415541]: group added to /etc/group: name=_keytab, GID=999 <86>Aug 30 10:53:06 groupadd[2415541]: group added to /etc/gshadow: name=_keytab <86>Aug 30 10:53:06 groupadd[2415541]: new group: name=_keytab, GID=999 <13>Aug 30 10:53:06 rpmi: libkrb5-1.21.3-alt2 sisyphus+351857.100.1.1 1719735219 installed <13>Aug 30 10:53:06 rpmi: libgsasl18-2.2.1-alt2 sisyphus+359713.200.2.1 1728905438 installed <86>Aug 30 10:53:06 groupadd[2415591]: group added to /etc/group: name=sasl, GID=998 <86>Aug 30 10:53:06 groupadd[2415591]: group added to /etc/gshadow: name=sasl <86>Aug 30 10:53:06 groupadd[2415591]: new group: name=sasl, GID=998 <13>Aug 30 10:53:06 rpmi: libsasl2-3-2.1.28-alt2.1 sisyphus+367419.100.1.1 1735482553 installed <13>Aug 30 10:53:06 rpmi: libldap2-2.6.9-alt2 sisyphus+367501.300.4.1 1735841767 installed <13>Aug 30 10:53:06 rpmi: libcurl-8.15.0-alt1 sisyphus+390603.100.1.1 1753257734 installed <13>Aug 30 10:53:06 rpmi: python3-module-gssapi-1.9.0-alt1 sisyphus+359349.100.1.1 1728472734 installed <13>Aug 30 10:53:06 rpmi: python3-module-asyncssh-2.21.0-alt1 sisyphus+383474.100.1.1 1746551078 installed <13>Aug 30 10:53:06 rpmi: python3-module-prompt_toolkit-3.0.52-alt1 sisyphus+393441.100.1.1 1756380259 installed <13>Aug 30 10:53:06 rpmi: python3-module-ipython-9.4.0-alt1.1 sisyphus+389117.100.1.1 1751727824 installed <13>Aug 30 10:53:06 rpmi: libcbor0.12-0.12.0-alt1 sisyphus+378362.540.4.1 1743150439 installed <13>Aug 30 10:53:06 rpmi: libfido2_1-1.16.0-alt2 sisyphus+392497.100.1.1 1755248638 installed <13>Aug 30 10:53:06 rpmi: libedit3-3.1.20250104-alt1 sisyphus+384216.200.2.1 1747315132 installed <86>Aug 30 10:53:06 groupadd[2416275]: group added to /etc/group: name=sshagent, GID=997 <86>Aug 30 10:53:06 groupadd[2416275]: group added to /etc/gshadow: name=sshagent <86>Aug 30 10:53:06 groupadd[2416275]: new group: name=sshagent, GID=997 <13>Aug 30 10:53:06 rpmi: openssh-clients-9.6p1-alt4 sisyphus+393310.300.4.1 1756289039 installed <13>Aug 30 10:53:06 rpmi: less-633-alt1 sisyphus+328181.300.2.1 1693321749 installed <13>Aug 30 10:53:06 rpmi: diffstat-1.64-alt1 sisyphus+346132.200.3.2 1716466240 installed <13>Aug 30 10:53:07 rpmi: git-core-2.50.1-alt1 sisyphus+379199.100.1.1 1752058634 installed <13>Aug 30 10:53:07 rpmi: python3-module-setuptools_scm-9.1.1-alt1 sisyphus+392276.100.2.1 1755011237 installed <13>Aug 30 10:53:07 rpmi: python3-module-hatch-vcs-0.5.0-alt1 sisyphus+385539.100.1.1 1748441724 installed <13>Aug 30 10:53:07 rpmi: python3-module-plumbum-1.9.0-alt1 sisyphus+359087.100.1.1 1728114789 installed <13>Aug 30 10:53:07 rpmi: python3-module-questionary-2.1.0-alt1 sisyphus+388059.300.8.1 1751961948 installed <13>Aug 30 10:53:07 rpmi: python3-module-poethepoet-0.36.0-alt1 sisyphus+388059.600.4.1 1751356548 installed <13>Aug 30 10:53:07 rpmi: python3-module-coverage-7.6.10-alt1 sisyphus+378449.100.1.1 1742313292 installed <13>Aug 30 10:53:07 rpmi: python3-module-jinja2-ansible-filters-1.3.2-alt1 sisyphus+388059.200.4.1 1751356482 installed <13>Aug 30 10:53:07 rpmi: python3-module-pytest-xdist-3.8.0-alt1 sisyphus+388717.100.1.1 1751445120 installed <13>Aug 30 10:53:07 rpmi: python3-module-pydantic-2.11.7-alt1 sisyphus+387540.200.3.1 1750336895 installed <13>Aug 30 10:53:07 rpmi: python3-module-pytest-gitconfig-0.7.0-alt1 sisyphus+380696.100.1.1 1744018430 installed <13>Aug 30 10:53:07 rpmi: python3-module-pexpect-4.9.0-alt1 sisyphus+341927.40.2.1 1709544794 installed <13>Aug 30 10:53:07 rpmi: python3-module-dunamai-1.25.0-alt1 sisyphus+392721.100.1.1 1755443055 installed <13>Aug 30 10:53:07 rpmi: python3-module-funcy-2.0-alt1 sisyphus+320088.100.4.1 1689853007 installed <13>Aug 30 10:53:07 rpmi: python3-module-colorama-0.4.6-alt1 sisyphus+308971.100.1.1 1666698282 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python3-module-copier-9.9.0-alt1.nosrc.rpm (w1.gzdio) Installing python3-module-copier-9.9.0-alt1.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.94607 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python3-module-copier-9.9.0 + echo 'Source #0 (python3-module-copier-9.9.0.tar):' Source #0 (python3-module-copier-9.9.0.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python3-module-copier-9.9.0.tar + cd python3-module-copier-9.9.0 + /bin/chmod -c -Rf u+rwX,go-w . + '[' '!' -d .git ']' + git init hint: Using 'master' as the name for the initial branch. This default branch name hint: is subject to change. To configure the initial branch name to use in all hint: of your new repositories, which will suppress this warning, call: hint: hint: git config --global init.defaultBranch hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m hint: hint: Disable this message with "git config set advice.defaultBranchName false" Initialized empty Git repository in /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.git/ + git config user.email author@example.com + git config user.name author + git add . + git commit -m release [master (root-commit) 2250b93] release 185 files changed, 24588 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .editorconfig create mode 100644 .envrc create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/ISSUE_TEMPLATE/problem.yml create mode 100644 .github/workflows/autofix.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml create mode 100644 .gitignore create mode 100644 .gitpod.yml create mode 100644 .pre-commit-config.yaml create mode 100644 .prettierrc.yml create mode 100644 .python-version create mode 100644 .readthedocs.yml create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 copier/__init__.py create mode 100644 copier/__main__.py create mode 100644 copier/_cli.py create mode 100644 copier/_deprecation.py create mode 100644 copier/_jinja_ext.py create mode 100644 copier/_main.py create mode 100644 copier/_subproject.py create mode 100644 copier/_template.py create mode 100644 copier/_tools.py create mode 100644 copier/_types.py create mode 100644 copier/_user_data.py create mode 100644 copier/_vcs.py create mode 100644 copier/cli.py create mode 100644 copier/errors.py create mode 100644 copier/jinja_ext.py create mode 100644 copier/main.py create mode 100644 copier/py.typed create mode 100644 copier/settings.py create mode 100644 copier/subproject.py create mode 100644 copier/template.py create mode 100644 copier/tools.py create mode 100644 copier/types.py create mode 100644 copier/user_data.py create mode 100644 copier/vcs.py create mode 100644 devbox.json create mode 100644 devbox.lock create mode 100644 devtasks.py create mode 120000 docs/changelog.md create mode 100644 docs/comparisons.md create mode 100644 docs/configuring.md create mode 120000 docs/contributing.md create mode 100644 docs/creating.md create mode 100644 docs/css/mkdocstrings.css create mode 100644 docs/faq.md create mode 100644 docs/generating.md create mode 120000 docs/index.md create mode 100644 docs/reference/cli.md create mode 100644 docs/reference/errors.md create mode 100644 docs/reference/jinja_ext.md create mode 100644 docs/reference/main.md create mode 100644 docs/reference/settings.md create mode 100644 docs/reference/subproject.md create mode 100644 docs/reference/template.md create mode 100644 docs/reference/tools.md create mode 100644 docs/reference/types.md create mode 100644 docs/reference/user_data.md create mode 100644 docs/reference/vcs.md create mode 100644 docs/settings.md create mode 100644 docs/updating.md create mode 100644 img/badge/badge-black.json create mode 100644 img/badge/badge-grayscale-border.json create mode 100644 img/badge/badge-grayscale-inverted-border-orange.json create mode 100644 img/badge/badge-grayscale-inverted-border-purple.json create mode 100644 img/badge/badge-grayscale-inverted-border-red.json create mode 100644 img/badge/badge-grayscale-inverted-border-teal.json create mode 100644 img/badge/badge-grayscale-inverted-border.json create mode 100644 img/badge/black-badge.json create mode 100644 img/copier-logotype.png create mode 100644 img/copier-logotype.svg create mode 100644 img/copier-output.png create mode 100644 img/logo.svg create mode 100644 mkdocs.yml create mode 100644 pyproject.toml create mode 100644 renovate.json create mode 100644 tests/__init__.py create mode 100644 tests/conftest.py create mode 100644 tests/demo/.gitignore create mode 100644 tests/demo/.svn create mode 100644 tests/demo/README.txt create mode 100644 tests/demo/README.txt.tmpl create mode 100644 tests/demo/[% if not py3 %]py2_folder[% endif %]/thing.py.tmpl create mode 100644 tests/demo/[% if not py3 %]py2_only.py[% endif %] create mode 100644 tests/demo/[% if py3 %]py3_folder[% endif %]/thing.py.tmpl create mode 100644 tests/demo/[% if py3 %]py3_only.py[% endif %] create mode 100644 tests/demo/[[ myvar ]].txt create mode 100644 tests/demo/[[ myvar ]]/hello.txt create mode 100644 tests/demo/aaaa.txt create mode 100644 tests/demo/config.py.tmpl create mode 100644 tests/demo/copier.yaml create mode 100644 tests/demo/doc/images/nslogo.gif create mode 100644 tests/demo/doc/manana.txt create mode 100644 "tests/demo/doc/man\314\203ana.txt" create mode 100644 "tests/demo/doc/ma\303\261ana.txt" create mode 100644 tests/demo/pyproject.toml.tmpl create mode 120000 tests/demo/symlink.txt create mode 100644 tests/demo_cleanup/copier.yml create mode 100644 tests/demo_cleanup/test.txt create mode 100644 tests/demo_config_empty/copier.yml create mode 100644 tests/demo_data/copier.yml create mode 100644 tests/demo_exclude/bad/subdir/file.txt create mode 100644 tests/demo_exclude/copier.yml create mode 100644 tests/demo_exclude_negate/copier.yml create mode 100644 tests/demo_exclude_negate/copy_me.txt create mode 100644 tests/demo_exclude_negate/do_not_copy_me.txt create mode 100644 tests/demo_extensions_additional/copier.yml create mode 100644 tests/demo_extensions_additional/super_file.md.jinja create mode 100644 tests/demo_extensions_default/super_file.md.jinja create mode 100644 tests/demo_invalid/copier.yml create mode 100644 tests/demo_legacy_migrations/[[ _copier_conf.answers_file ]].tmpl create mode 100644 tests/demo_legacy_migrations/copier.yaml create mode 100644 tests/demo_legacy_migrations/delete-in-migration-v2.txt create mode 100644 tests/demo_legacy_migrations/delete-in-tasks.txt create mode 100755 tests/demo_legacy_migrations/migrations.py create mode 100755 tests/demo_legacy_migrations/tasks.py create mode 100644 tests/demo_merge_options_from_answerfiles/copier.yml create mode 100644 tests/demo_merge_options_from_answerfiles/include1.yml create mode 100644 tests/demo_merge_options_from_answerfiles/include2.yml create mode 100644 tests/demo_multi_config/copier.yaml create mode 100644 tests/demo_multi_config/copier.yml create mode 100644 tests/demo_skip_dst/a.noeof.txt create mode 100644 tests/demo_skip_dst/b.noeof.txt create mode 100644 tests/demo_skip_dst/meh/c.noeof.txt create mode 100644 tests/demo_skip_src/a.noeof.txt create mode 100644 tests/demo_skip_src/b.noeof.txt create mode 100644 tests/demo_skip_src/copier.yml create mode 100644 tests/demo_skip_src/meh/c.noeof.txt create mode 100644 tests/demo_transclude/demo/copier.yml create mode 100644 tests/demo_transclude/include_me.yml create mode 100644 tests/demo_transclude_invalid/demo/copier.yml create mode 100644 tests/demo_transclude_invalid/include_me.yml create mode 100644 tests/demo_transclude_invalid_multi/demo/copier.yml create mode 100644 tests/demo_transclude_invalid_multi/include_me.yml create mode 100644 tests/demo_transclude_invalid_multi/include_me_too.yml create mode 100644 tests/demo_updatediff_repo.bundle create mode 100644 tests/helpers.py create mode 100644 tests/reference_files/pyproject.toml create mode 100644 tests/test_answersfile.py create mode 100644 tests/test_answersfile_templating.py create mode 100644 tests/test_cleanup.py create mode 100644 tests/test_cli.py create mode 100644 tests/test_complex_questions.py create mode 100644 tests/test_conditional_file_name.py create mode 100644 tests/test_config.py create mode 100644 tests/test_context.py create mode 100644 tests/test_copy.py create mode 100644 tests/test_demo_update_tasks.py create mode 100644 tests/test_dirty_local.py create mode 100644 tests/test_dynamic_file_structures.py create mode 100644 tests/test_empty_suffix.py create mode 100644 tests/test_exclude.py create mode 100644 tests/test_imports.py create mode 100644 tests/test_interrupts.py create mode 100644 tests/test_jinja2_extensions.py create mode 100644 tests/test_legacy_migration.py create mode 100644 tests/test_migrations.py create mode 100644 tests/test_minimum_version.py create mode 100644 tests/test_normal_jinja2.py create mode 100644 tests/test_output.py create mode 100644 tests/test_prompt.py create mode 100644 tests/test_recopy.py create mode 100644 tests/test_settings.py create mode 100644 tests/test_subdirectory.py create mode 100644 tests/test_symlinks.py create mode 100644 tests/test_tasks.py create mode 100644 tests/test_templated_prompt.py create mode 100644 tests/test_tmpdir.py create mode 100644 tests/test_tools.py create mode 100644 tests/test_unsafe.py create mode 100644 tests/test_updatediff.py create mode 100644 tests/test_vcs.py create mode 100644 uv.lock + git tag 9.9.0 + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json show pep518 + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json sync pep518 --verify --verify-exclude 'wheel$' + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json show pep517 + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json sync pep517 --verify --verify-exclude 'wheel$' + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json show metadata + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json sync metadata --verify INFO : Building metadata INFO : Building metadata with prepare_metadata_for_build_wheel INFO : Source tree: /usr/src/RPM/BUILD/python3-module-copier-9.9.0 INFO : Output dir: /usr/src/tmp/tmpecxye2zt + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json show check + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json sync check --verify + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.23745 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-copier-9.9.0 + export 'CFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export 'CXXFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export 'FFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + /usr/bin/python3 -m pyproject_installer -v build INFO : pyproject_installer.build_cmd._build : Building wheel INFO : pyproject_installer.build_cmd._build : Source tree: /usr/src/RPM/BUILD/python3-module-copier-9.9.0 INFO : pyproject_installer.build_cmd._build : Output dir: /usr/src/RPM/BUILD/python3-module-copier-9.9.0/dist DEBUG : pyproject_installer.lib.build_backend : Validating source path DEBUG : pyproject_installer.lib.build_backend : Checking for PEP517 spec DEBUG : pyproject_installer.lib.build_backend : Parsing configuration file: /usr/src/RPM/BUILD/python3-module-copier-9.9.0/pyproject.toml INFO : backend_caller.py : Calling hook build_wheel in subprocess INFO : backend_caller.py : Build backend: hatchling.build INFO : backend_caller.py : Hook args: ['/usr/src/RPM/BUILD/python3-module-copier-9.9.0/dist'] INFO : backend_caller.py : Hook kwargs: {'config_settings': None} INFO : pyproject_installer.build_cmd._build : Built wheel: copier-9.9.0-py3-none-any.whl + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.92748 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-copier-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python3-module-copier-buildroot + PATH=/usr/libexec/rpm-build:/usr/src/bin:/usr/bin:/bin:/usr/local/bin:/usr/games + cd python3-module-copier-9.9.0 + /usr/bin/python3 -m pyproject_installer -v install --destdir=/usr/src/tmp/python3-module-copier-buildroot INFO : pyproject_installer.install_cmd._install : Installing wheel INFO : pyproject_installer.install_cmd._install : Wheel directory: /usr/src/RPM/BUILD/python3-module-copier-9.9.0/dist INFO : pyproject_installer.install_cmd._install : Wheel filename: copier-9.9.0-py3-none-any.whl INFO : pyproject_installer.install_cmd._install : Destination: /usr/src/tmp/python3-module-copier-buildroot DEBUG : pyproject_installer.lib.wheel : Parsing wheel filename DEBUG : pyproject_installer.lib.wheel : Validating wheel file DEBUG : pyproject_installer.lib.wheel : Validating wheel spec version DEBUG : pyproject_installer.lib.wheel : Parsing wheel spec metadata DEBUG : pyproject_installer.lib.wheel : Validating RECORD INFO : pyproject_installer.install_cmd._install : Wheel installation root: /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages INFO : pyproject_installer.install_cmd._install : Extracting wheel DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: copier-9.9.0.dist-info/WHEEL DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: copier-9.9.0.dist-info/licenses/LICENSE DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: copier-9.9.0.dist-info/RECORD INFO : pyproject_installer.install_cmd._install : Generating entrypoints scripts DEBUG : pyproject_installer.lib.scripts : Installing console script: copier INFO : pyproject_installer.install_cmd._install : Wheel was installed + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python3-module-copier-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python3-module-copier-buildroot (binconfig,pkgconfig,libtool,desktop,gnuconfig) Checking contents of files in /usr/src/tmp/python3-module-copier-buildroot/ (default) Compressing files in /usr/src/tmp/python3-module-copier-buildroot (auto) Adjusting library links in /usr/src/tmp/python3-module-copier-buildroot ./usr/lib: (from :0) Verifying ELF objects in /usr/src/tmp/python3-module-copier-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Splitting links to aliased files under /{,s}bin in /usr/src/tmp/python3-module-copier-buildroot Bytecompiling python3 modules in /usr/src/tmp/python3-module-copier-buildroot using /usr/bin/python3 compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/__init__.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/__main__.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_cli.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_deprecation.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_jinja_ext.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_main.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_subproject.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_template.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_tools.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_types.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_user_data.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_vcs.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/cli.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/errors.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/jinja_ext.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/main.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/settings.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/subproject.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/template.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/tools.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/types.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/user_data.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/vcs.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python3-module-copier-buildroot using /usr/bin/python3 -O compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/__init__.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/__main__.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_cli.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_deprecation.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_jinja_ext.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_main.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_subproject.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_template.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_tools.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_types.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_user_data.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_vcs.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/cli.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/errors.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/jinja_ext.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/main.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/settings.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/subproject.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/template.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/tools.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/types.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/user_data.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/vcs.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python3-module-copier-buildroot using /usr/bin/python3 -OO compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/__init__.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/__main__.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_cli.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_deprecation.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_jinja_ext.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_main.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_subproject.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_template.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_tools.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_types.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_user_data.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/_vcs.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/cli.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/errors.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/jinja_ext.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/main.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/settings.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/subproject.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/template.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/tools.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/types.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/user_data.py compile /usr/src/tmp/python3-module-copier-buildroot/usr/lib/python3/site-packages/copier/vcs.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/copier/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/__main__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/__main__.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/_cli.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/_cli.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/_deprecation.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/_deprecation.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/_jinja_ext.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/_jinja_ext.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/_subproject.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/_subproject.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/_tools.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/_tools.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/_types.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/_types.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/_user_data.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/_user_data.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/_vcs.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/_vcs.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/cli.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/cli.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/jinja_ext.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/jinja_ext.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/main.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/main.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/settings.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/settings.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/subproject.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/subproject.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/template.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/template.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/tools.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/tools.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/types.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/types.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/user_data.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/user_data.cpython-312.pyc' './usr/lib/python3/site-packages/copier/__pycache__/vcs.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/copier/__pycache__/vcs.cpython-312.pyc' Executing(%check): /bin/sh -e /usr/src/tmp/rpm-tmp.5478 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-copier-9.9.0 + export 'CFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export 'CXXFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export 'FFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export NO_INTERNET=YES + NO_INTERNET=YES + /usr/bin/python3 -m pyproject_installer run -- python3 -m pytest --deselect tests/test_copy.py::test_copy_repo --deselect tests/test_vcs.py::test_clone --deselect tests/test_vcs.py::test_shallow_clone --deselect tests/test_vcs.py::test_local_clone --deselect tests/test_vcs.py::test_removes_temporary_clone --deselect tests/test_vcs.py::test_dont_remove_local_clone --deselect tests/test_vcs.py::test_update_using_local_source_path_with_tilde --deselect tests/test_updatediff.py::test_commit_hooks_respected --deselect tests/test_tools.py::test_types --deselect tests/test_prompt.py::test_path_completion INFO : Creating venv INFO : Installing console scripts INFO : Installing package: /usr/src/RPM/BUILD/python3-module-copier-9.9.0/dist/copier-9.9.0-py3-none-any.whl INFO : Running command: ['/usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3', '-m', 'pyproject_installer', 'install', '/usr/src/RPM/BUILD/python3-module-copier-9.9.0/dist/copier-9.9.0-py3-none-any.whl'] INFO : Running command: ['python3', '-m', 'pytest', '--deselect', 'tests/test_copy.py::test_copy_repo', '--deselect', 'tests/test_vcs.py::test_clone', '--deselect', 'tests/test_vcs.py::test_shallow_clone', '--deselect', 'tests/test_vcs.py::test_local_clone', '--deselect', 'tests/test_vcs.py::test_removes_temporary_clone', '--deselect', 'tests/test_vcs.py::test_dont_remove_local_clone', '--deselect', 'tests/test_vcs.py::test_update_using_local_source_path_with_tilde', '--deselect', 'tests/test_updatediff.py::test_commit_hooks_respected', '--deselect', 'tests/test_tools.py::test_types', '--deselect', 'tests/test_prompt.py::test_path_completion'] ============================= test session starts ============================== platform linux -- Python 3.12.11, pytest-8.3.5, pluggy-1.6.0 rootdir: /usr/src/RPM/BUILD/python3-module-copier-9.9.0 configfile: pyproject.toml plugins: gitconfig-0.7.0, xdist-3.8.0 created: 32/32 workers 32 workers [963 items] ........................................................................ [ 7%] ........................................................................ [ 14%] ........................................................................ [ 22%] ........................................................................ [ 29%] .....F.F................................................................ [ 37%] ........................................................................ [ 44%] ........................................................................ [ 52%] ........................................................................ [ 59%] ........................................................................ [ 67%] .......Fs......................F.......FF........F..FF.s..FFF.FFF.F..... [ 74%] F....F....F.....F....FFF.......F.......FFFF..FFF.....................F.F [ 82%] .F...................FF..F.F.FFFFF..FF.....F...FFF.F.F..FF.FF........... [ 89%] ...F.........................................x......................x... [ 97%] x...............x.......... [100%] =================================== FAILURES =================================== _____________________________ test_cli_interactive _____________________________ [gw8] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 template_path = '/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw8/template0' tmp_path = PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw8/test_cli_interactive0') spawn = ._spawn at 0xf41781b8> def test_cli_interactive(template_path: str, tmp_path: Path, spawn: Spawn) -> None: """Test copier correctly processes advanced questions and answers through CLI.""" tui = spawn(COPIER_PATH + ("copy", template_path, str(tmp_path)), timeout=10) expect_prompt(tui, "love_me", "bool", help="I need to know it. Do you love me?") tui.send("y") expect_prompt(tui, "your_name", "str", help="Please tell me your name.") tui.sendline("Guybrush Threpwood") check_invalid(tui, "your_age", "int", "wrong your_age", help="How old are you?") tui.send((Keyboard.Alt + Keyboard.Backspace) * 2) tui.send("-1") tui.expect_exact("Must be +") tui.send(Keyboard.Backspace * 2) tui.sendline("22") check_invalid( tui, "your_height", "float", "wrong your_height", help="What's your height?" ) tui.send((Keyboard.Alt + Keyboard.Backspace) * 2) tui.sendline("1.56") check_invalid(tui, "more_json_info", "json", '{"objective":') tui.sendline('"be a pirate"}') tui.send(Keyboard.Esc + Keyboard.Enter) expect_prompt(tui, "anything_else", "yaml", help="Wanna give me any more info?") tui.sendline("- Want some grog?") tui.sendline("- I'd love it") tui.send(Keyboard.Esc + Keyboard.Enter) > expect_prompt(tui, "choose_list", "str", help="You see the value of the list items") tests/test_complex_questions.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:148: in expect_prompt tui.expect_exact(help) /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'You see the value of the list items' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). 🎤 I need to know it. Do you love me? (y/N) y🎤 I need to know it. Do you love me? Yes 🎤 Please tell me your name. Guybrush Threpwood 🎤 Please tell me your name. Guybrush Threpwood 🎤 Please tell me your name. Guybrush Threpwood 🎤 How old are you? wrong your_age wrong your_age Invalid input -1-1 Validatio error for question 'your_age': Must be +22 🎤 How old are you? 22 🎤 How old are you? 22 🎤 What's your height? wrong your_height wrong your_height Invalid input 1.56 🎤 What's your height? 1.56 🎤 What's your height? 1.56 🎤 more_json_info (json) (Finish with 'Alt+Enter' or 'Esc then Enter') > {"objective": {"objective": Invalid input"be a pirate"}  🎤 more_json_info (json) (Finish with 'Alt+Enter' or 'Esc then Enter') > {"objective": "be a pirate"} 🎤 more_json_info (json) (Finish with 'Alt+Enter' or 'Esc then Enter') > {"objective": "be a pirate"} 🎤 Wanna give me any more info? (Finish with 'Alt+Enter' or 'Esc then Enter') > - Want some grog? - I'd love it  🎤 Wanna give me any more info? (Finish with 'Alt+Enter' or 'Esc then Enter') > - Want some grog? - I'd love it 🎤 Wanna give me any more info? (Finish with 'Alt+Enter' or 'Esc then Enter') > - Want some grog? - I'd love it Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ___________________________ test_selection_type_cast ___________________________ [gw12] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw12'), _trace=._spawn at 0xf4225f28> def test_selection_type_cast( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn ) -> None: """Selection question with different types, properly casted.""" src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yaml"): ( """\ postgres1: &pg type: yaml default: 10 help: Which PostgreSQL version do you want to deploy? choices: I will use an external PostgreSQL server: null "9.6": 9.6 "10": 10 postgres2: *pg postgres3: *pg nulls1: &nulls type: yaml choices: - [same as key, null] - [yaml-casted to a real null, "null"] - [becomes array, "[one, 2, -3.0]"] nulls2: *nulls nulls3: *nulls """ ), (src / "answers.json.jinja"): "{{ _copier_answers|to_json }}", } ) tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) > expect_prompt( tui, "postgres1", "yaml", help="Which PostgreSQL version do you want to deploy?" ) tests/test_complex_questions.py:511: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:148: in expect_prompt tui.expect_exact(help) /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'Which PostgreSQL version do you want to deploy?' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _________________________ test_update_choice[choices2] _________________________ [gw17] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw17'), _trace=._spawn at 0xf418b398> choices = {'one': 1, 'three': 3, 'two': 2} @pytest.mark.parametrize( "choices", ( [1, 2, 3], [["one", 1], ["two", 2], ["three", 3]], {"one": 1, "two": 2, "three": 3}, ), ) def test_update_choice( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, choices: list[int] | list[list[str | int]] | dict[str, int], ) -> None: """Choices are properly remembered and selected in TUI when updating.""" src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) # Create template build_file_tree( { (src / "copier.yml"): ( f"""\ _templates_suffix: {SUFFIX_TMPL} _envops: {BRACKET_ENVOPS_JSON} pick_one: type: float default: 3 choices: {choices} """ ), (src / "[[ _copier_conf.answers_file ]].tmpl"): ( "[[ _copier_answers|to_nice_yaml ]]" ), } ) with local.cwd(src): git("init") git("add", ".") git("commit", "-m one") git("tag", "v1") # Copy tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) > expect_prompt(tui, "pick_one", "float") tests/test_prompt.py:584: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:150: in expect_prompt tui.expect_exact(name) /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'pick_one' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ______________ test_required_choice_question[float-choices2-1.0] _______________ [gw18] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw18'), _trace=._spawn at 0xf41af4d8>, type_name = 'float' choices = [1.0, 2.0, 3.0], expected_answer = 1.0 @pytest.mark.parametrize( "type_name, choices, expected_answer", [ ("str", ["one", "two", "three"], "one"), ("int", [1, 2, 3], 1), ("float", [1.0, 2.0, 3.0], 1.0), ("json", ["[1]", "[2]", "[3]"], [1]), ("yaml", ["- 1", "- 2", "- 3"], [1]), ], ) def test_required_choice_question( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, type_name: str, choices: list[Any], expected_answer: Any, ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): yaml.dump( { "_envops": BRACKET_ENVOPS, "_templates_suffix": SUFFIX_TMPL, "question": { "type": type_name, "choices": choices, }, } ), (src / "[[ _copier_conf.answers_file ]].tmpl"): ( "[[ _copier_answers|to_nice_yaml ]]" ), } ) tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:852: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(float)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ______ test_multiselect_choices_question_multiple_answers[int-label-dict] ______ [gw11] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf41ab398> copier = .fixture at 0xf41ab7a8>, type_name = 'int' choices = {'1. one': 1, '2. two': 2, '3. three': 3}, values = [1, 2, 3] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_multiple_answers( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree(type=type_name, choices=choices, multiselect=True) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:947: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(int)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _______________ test_required_choice_question[str-choices0-one] ________________ [gw7] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw7'), _trace=._spawn at 0xf41ddf28>, type_name = 'str' choices = ['one', 'two', 'three'], expected_answer = 'one' @pytest.mark.parametrize( "type_name, choices, expected_answer", [ ("str", ["one", "two", "three"], "one"), ("int", [1, 2, 3], 1), ("float", [1.0, 2.0, 3.0], 1.0), ("json", ["[1]", "[2]", "[3]"], [1]), ("yaml", ["- 1", "- 2", "- 3"], [1]), ], ) def test_required_choice_question( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, type_name: str, choices: list[Any], expected_answer: Any, ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): yaml.dump( { "_envops": BRACKET_ENVOPS, "_templates_suffix": SUFFIX_TMPL, "question": { "type": type_name, "choices": choices, }, } ), (src / "[[ _copier_conf.answers_file ]].tmpl"): ( "[[ _copier_answers|to_nice_yaml ]]" ), } ) tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) expect_prompt(tui, "question", type_name) tui.sendline() tui.expect_exact(pexpect.EOF) answers = load_answersfile_data(dst) > assert answers == { "_src_path": str(src), "question": expected_answer, } E AssertionError: assert {} == {'_src_path':...stion': 'one'} E E Right contains 2 more items: E {'_src_path': '/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw7/src9', E 'question': 'one'} E Use -v to get more diff tests/test_prompt.py:856: AssertionError ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ____________ test_multiselect_choices_question_single_answer[float] ____________ [gw8] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf4181cf8> copier = .fixture at 0xf37a90c8>, type_name = 'float' choices = [1.0, 2.0, 3.0], values = [1.0, 2.0, 3.0] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_single_answer( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree(type=type_name, choices=choices, multiselect=True) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:929: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(float)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ____________ test_multiselect_choices_question_single_answer[yaml] _____________ [gw24] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf425cf28> copier = .fixture at 0xf425ce38>, type_name = 'yaml' choices = ['- 1', '- 2', '- 3'], values = [[1], [2], [3]] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_single_answer( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree(type=type_name, choices=choices, multiselect=True) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:929: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(yaml)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _______ test_multiselect_choices_question_single_answer[int-label-list] ________ [gw13] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf410e488> copier = .fixture at 0xf410ede8>, type_name = 'int' choices = [['one', 1], ['two', 2], ['three', 3]], values = [1, 2, 3] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_single_answer( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree(type=type_name, choices=choices, multiselect=True) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:929: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(int)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ___________ test_multiselect_choices_question_multiple_answers[int] ____________ [gw5] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf416fb68> copier = .fixture at 0xf416f668>, type_name = 'int' choices = [1, 2, 3], values = [1, 2, 3] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_multiple_answers( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree(type=type_name, choices=choices, multiselect=True) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:947: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(int)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ___________ test_multiselect_choices_question_multiple_answers[json] ___________ [gw31] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf4201de8> copier = .fixture at 0xf4201bb8>, type_name = 'json' choices = ['[1]', '[2]', '[3]'], values = [[1], [2], [3]] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_multiple_answers( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree(type=type_name, choices=choices, multiselect=True) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:947: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(json)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ____________ test_multiselect_choices_question_with_default[float] _____________ [gw21] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf41dccf8> copier = .fixture at 0xf41dc7a8>, type_name = 'float' choices = [1.0, 2.0, 3.0], values = [1.0, 2.0, 3.0] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_with_default( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree( type=type_name, choices=choices, multiselect=True, default=values ) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:969: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(float)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _____________ test_multiselect_choices_question_with_default[str] ______________ [gw26] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf41d5578> copier = .fixture at 0xf41d5cf8>, type_name = 'str' choices = ['one', 'two', 'three'], values = ['one', 'two', 'three'] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_with_default( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree( type=type_name, choices=choices, multiselect=True, default=values ) tui = copier("copy", str(src), str(dst), timeout=10) expect_prompt(tui, "question", type_name) tui.send(" ") # toggle first tui.sendline() tui.expect_exact(pexpect.EOF) answers = load_answersfile_data(dst) > assert answers["question"] == values[1:] E KeyError: 'question' tests/test_prompt.py:974: KeyError ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _________________________ test_update_choice[choices0] _________________________ [gw3] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw3'), _trace=._spawn at 0xf41a0028>, choices = [1, 2, 3] @pytest.mark.parametrize( "choices", ( [1, 2, 3], [["one", 1], ["two", 2], ["three", 3]], {"one": 1, "two": 2, "three": 3}, ), ) def test_update_choice( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, choices: list[int] | list[list[str | int]] | dict[str, int], ) -> None: """Choices are properly remembered and selected in TUI when updating.""" src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) # Create template build_file_tree( { (src / "copier.yml"): ( f"""\ _templates_suffix: {SUFFIX_TMPL} _envops: {BRACKET_ENVOPS_JSON} pick_one: type: float default: 3 choices: {choices} """ ), (src / "[[ _copier_conf.answers_file ]].tmpl"): ( "[[ _copier_answers|to_nice_yaml ]]" ), } ) with local.cwd(src): git("init") git("add", ".") git("commit", "-m one") git("tag", "v1") # Copy tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) > expect_prompt(tui, "pick_one", "float") tests/test_prompt.py:584: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:150: in expect_prompt tui.expect_exact(name) /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'pick_one' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _____________ test_multiselect_choices_question_with_default[yaml] _____________ [gw2] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf43e2d48> copier = .fixture at 0xf435c7f8>, type_name = 'yaml' choices = ['- 1', '- 2', '- 3'], values = [[1], [2], [3]] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_with_default( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree( type=type_name, choices=choices, multiselect=True, default=values ) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:969: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(yaml)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _____________ test_multiselect_choices_question_single_answer[str] _____________ [gw29] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf422af78> copier = .fixture at 0xf417ce88>, type_name = 'str' choices = ['one', 'two', 'three'], values = ['one', 'two', 'three'] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_single_answer( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree(type=type_name, choices=choices, multiselect=True) tui = copier("copy", str(src), str(dst), timeout=10) expect_prompt(tui, "question", type_name) tui.send(" ") # select 1 tui.sendline() tui.expect_exact(pexpect.EOF) answers = load_answersfile_data(dst) > assert answers["question"] == values[:1] E KeyError: 'question' tests/test_prompt.py:934: KeyError ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _____________________ test_update_multiselect_choices[int] _____________________ [gw12] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf4286f78> copier = .fixture at 0xf4237118>, type_name = 'int' choices = [1, 2, 3], values = [1, 2, 3] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_update_multiselect_choices( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: """Multiple choices are properly remembered and selected in TUI when updating.""" src, dst = question_tree( type=type_name, choices=choices, multiselect=True, default=values ) with local.cwd(src): git("init") git("add", ".") git("commit", "-m one") git("tag", "v1") # Copy tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:998: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(int)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ________ test_multiselect_choices_question_with_default[int-label-list] ________ [gw27] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf41a66b8> copier = .fixture at 0xf41a6c08>, type_name = 'int' choices = [['one', 1], ['two', 2], ['three', 3]], values = [1, 2, 3] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_with_default( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree( type=type_name, choices=choices, multiselect=True, default=values ) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:969: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(int)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ______________________ test_multiselect_choices_validator ______________________ [gw20] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf41c9e38> copier = .fixture at 0xf41c9ca8> def test_multiselect_choices_validator( question_tree: QuestionTreeFixture, copier: CopierFixture ) -> None: """Multiple choices are validated.""" src, dst = question_tree( type="str", choices=["one", "two", "three"], multiselect=True, validator=("[%- if not question -%]At least one choice required[%- endif -%]"), ) tui = copier("copy", str(src), str(dst), timeout=10) expect_prompt(tui, "question", "str") tui.sendline() > tui.expect_exact("At least one choice required") tests/test_prompt.py:1034: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'At least one choice required' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ________ test_required_choice_question[json-choices3-expected_answer3] _________ [gw18] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw18'), _trace=._spawn at 0xf3961848>, type_name = 'json' choices = ['[1]', '[2]', '[3]'], expected_answer = [1] @pytest.mark.parametrize( "type_name, choices, expected_answer", [ ("str", ["one", "two", "three"], "one"), ("int", [1, 2, 3], 1), ("float", [1.0, 2.0, 3.0], 1.0), ("json", ["[1]", "[2]", "[3]"], [1]), ("yaml", ["- 1", "- 2", "- 3"], [1]), ], ) def test_required_choice_question( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, type_name: str, choices: list[Any], expected_answer: Any, ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): yaml.dump( { "_envops": BRACKET_ENVOPS, "_templates_suffix": SUFFIX_TMPL, "question": { "type": type_name, "choices": choices, }, } ), (src / "[[ _copier_conf.answers_file ]].tmpl"): ( "[[ _copier_answers|to_nice_yaml ]]" ), } ) tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:852: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(json)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ____________________ test_update_multiselect_choices[json] _____________________ [gw4] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf4125e38> copier = .fixture at 0xf4197438>, type_name = 'json' choices = ['[1]', '[2]', '[3]'], values = [[1], [2], [3]] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_update_multiselect_choices( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: """Multiple choices are properly remembered and selected in TUI when updating.""" src, dst = question_tree( type=type_name, choices=choices, multiselect=True, default=values ) with local.cwd(src): git("init") git("add", ".") git("commit", "-m one") git("tag", "v1") # Copy tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:998: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(json)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _______________ test_update_multiselect_choices[int-label-dict] ________________ [gw1] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf4275708> copier = .fixture at 0xf4275118>, type_name = 'int' choices = {'1. one': 1, '2. two': 2, '3. three': 3}, values = [1, 2, 3] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_update_multiselect_choices( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: """Multiple choices are properly remembered and selected in TUI when updating.""" src, dst = question_tree( type=type_name, choices=choices, multiselect=True, default=values ) with local.cwd(src): git("init") git("add", ".") git("commit", "-m one") git("tag", "v1") # Copy tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:998: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(int)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' __________ test_multiselect_choices_question_multiple_answers[float] ___________ [gw11] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf415ff28> copier = .fixture at 0xf415fcf8>, type_name = 'float' choices = [1.0, 2.0, 3.0], values = [1.0, 2.0, 3.0] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_multiple_answers( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree(type=type_name, choices=choices, multiselect=True) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:947: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(float)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ________________ test_required_choice_question[int-choices1-1] _________________ [gw7] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw7'), _trace=._spawn at 0xf419b3e8>, type_name = 'int' choices = [1, 2, 3], expected_answer = 1 @pytest.mark.parametrize( "type_name, choices, expected_answer", [ ("str", ["one", "two", "three"], "one"), ("int", [1, 2, 3], 1), ("float", [1.0, 2.0, 3.0], 1.0), ("json", ["[1]", "[2]", "[3]"], [1]), ("yaml", ["- 1", "- 2", "- 3"], [1]), ], ) def test_required_choice_question( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, type_name: str, choices: list[Any], expected_answer: Any, ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): yaml.dump( { "_envops": BRACKET_ENVOPS, "_templates_suffix": SUFFIX_TMPL, "question": { "type": type_name, "choices": choices, }, } ), (src / "[[ _copier_conf.answers_file ]].tmpl"): ( "[[ _copier_answers|to_nice_yaml ]]" ), } ) tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:852: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(int)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ___________ test_multiselect_choices_question_multiple_answers[yaml] ___________ [gw31] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf4196a28> copier = .fixture at 0xf4196ac8>, type_name = 'yaml' choices = ['- 1', '- 2', '- 3'], values = [[1], [2], [3]] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_multiple_answers( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree(type=type_name, choices=choices, multiselect=True) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:947: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(yaml)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _______ test_multiselect_choices_question_single_answer[int-label-dict] ________ [gw13] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf410e398> copier = .fixture at 0xf410e348>, type_name = 'int' choices = {'1. one': 1, '2. two': 2, '3. three': 3}, values = [1, 2, 3] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_single_answer( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree(type=type_name, choices=choices, multiselect=True) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:929: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(int)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ___________ test_multiselect_choices_question_multiple_answers[str] ____________ [gw24] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf41de5c8> copier = .fixture at 0xf41de6b8>, type_name = 'str' choices = ['one', 'two', 'three'], values = ['one', 'two', 'three'] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_multiple_answers( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree(type=type_name, choices=choices, multiselect=True) tui = copier("copy", str(src), str(dst), timeout=10) expect_prompt(tui, "question", type_name) tui.send(" ") # select 0 tui.send(Keyboard.Down) tui.send(" ") # select 1 tui.sendline() tui.expect_exact(pexpect.EOF) answers = load_answersfile_data(dst) > assert answers["question"] == values[:2] E KeyError: 'question' tests/test_prompt.py:954: KeyError ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs)  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _____________ test_multiselect_choices_question_with_default[json] _____________ [gw21] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf41dc258> copier = .fixture at 0xf41dc758>, type_name = 'json' choices = ['[1]', '[2]', '[3]'], values = [[1], [2], [3]] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_with_default( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree( type=type_name, choices=choices, multiselect=True, default=values ) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:969: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(json)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ____________ test_multiselect_choices_question_single_answer[json] _____________ [gw8] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf41c7f78> copier = .fixture at 0xf4139bb8>, type_name = 'json' choices = ['[1]', '[2]', '[3]'], values = [[1], [2], [3]] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_single_answer( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree(type=type_name, choices=choices, multiselect=True) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:929: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(json)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ______ test_multiselect_choices_question_multiple_answers[int-label-list] ______ [gw5] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf4126848> copier = .fixture at 0xf41267f8>, type_name = 'int' choices = [['one', 1], ['two', 2], ['three', 3]], values = [1, 2, 3] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_multiple_answers( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree(type=type_name, choices=choices, multiselect=True) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:947: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(int)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _____________ test_multiselect_choices_question_with_default[int] ______________ [gw26] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf420bd98> copier = .fixture at 0xf420bf78>, type_name = 'int' choices = [1, 2, 3], values = [1, 2, 3] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_with_default( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree( type=type_name, choices=choices, multiselect=True, default=values ) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:969: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(int)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _________________________ test_update_choice[choices1] _________________________ [gw3] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw3'), _trace=._spawn at 0xf41ace88> choices = [['one', 1], ['two', 2], ['three', 3]] @pytest.mark.parametrize( "choices", ( [1, 2, 3], [["one", 1], ["two", 2], ["three", 3]], {"one": 1, "two": 2, "three": 3}, ), ) def test_update_choice( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, choices: list[int] | list[list[str | int]] | dict[str, int], ) -> None: """Choices are properly remembered and selected in TUI when updating.""" src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) # Create template build_file_tree( { (src / "copier.yml"): ( f"""\ _templates_suffix: {SUFFIX_TMPL} _envops: {BRACKET_ENVOPS_JSON} pick_one: type: float default: 3 choices: {choices} """ ), (src / "[[ _copier_conf.answers_file ]].tmpl"): ( "[[ _copier_answers|to_nice_yaml ]]" ), } ) with local.cwd(src): git("init") git("add", ".") git("commit", "-m one") git("tag", "v1") # Copy tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) > expect_prompt(tui, "pick_one", "float") tests/test_prompt.py:584: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:150: in expect_prompt tui.expect_exact(name) /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'pick_one' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _____________ test_multiselect_choices_question_single_answer[int] _____________ [gw29] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf4168488> copier = .fixture at 0xf41685c8>, type_name = 'int' choices = [1, 2, 3], values = [1, 2, 3] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_single_answer( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree(type=type_name, choices=choices, multiselect=True) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:929: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(int)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _____________________ test_update_multiselect_choices[str] _____________________ [gw2] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf435cb68> copier = .fixture at 0xf435ced8>, type_name = 'str' choices = ['one', 'two', 'three'], values = ['one', 'two', 'three'] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_update_multiselect_choices( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: """Multiple choices are properly remembered and selected in TUI when updating.""" src, dst = question_tree( type=type_name, choices=choices, multiselect=True, default=values ) with local.cwd(src): git("init") git("add", ".") git("commit", "-m one") git("tag", "v1") # Copy tui = copier("copy", str(src), str(dst), timeout=10) expect_prompt(tui, "question", type_name) tui.send(" ") # toggle first tui.sendline() tui.expect_exact(pexpect.EOF) answers = load_answersfile_data(dst) > assert answers["question"] == values[1:] E KeyError: 'question' tests/test_prompt.py:1003: KeyError ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _______________ test_update_multiselect_choices[int-label-list] ________________ [gw12] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf39ca7f8> copier = .fixture at 0xf39ca2f8>, type_name = 'int' choices = [['one', 1], ['two', 2], ['three', 3]], values = [1, 2, 3] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_update_multiselect_choices( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: """Multiple choices are properly remembered and selected in TUI when updating.""" src, dst = question_tree( type=type_name, choices=choices, multiselect=True, default=values ) with local.cwd(src): git("init") git("add", ".") git("commit", "-m one") git("tag", "v1") # Copy tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:998: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(int)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ________ test_multiselect_choices_question_with_default[int-label-dict] ________ [gw27] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf39675c8> copier = .fixture at 0xf3967578>, type_name = 'int' choices = {'1. one': 1, '2. two': 2, '3. three': 3}, values = [1, 2, 3] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_multiselect_choices_question_with_default( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: src, dst = question_tree( type=type_name, choices=choices, multiselect=True, default=values ) tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:969: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(int)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ____________________ test_update_multiselect_choices[yaml] _____________________ [gw4] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf3e2a618> copier = .fixture at 0xf3e2a5c8>, type_name = 'yaml' choices = ['- 1', '- 2', '- 3'], values = [[1], [2], [3]] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_update_multiselect_choices( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: """Multiple choices are properly remembered and selected in TUI when updating.""" src, dst = question_tree( type=type_name, choices=choices, multiselect=True, default=values ) with local.cwd(src): git("init") git("add", ".") git("commit", "-m one") git("tag", "v1") # Copy tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:998: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(yaml)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ________ test_required_choice_question[yaml-choices4-expected_answer4] _________ [gw18] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw18'), _trace=._spawn at 0xf3961528>, type_name = 'yaml' choices = ['- 1', '- 2', '- 3'], expected_answer = [1] @pytest.mark.parametrize( "type_name, choices, expected_answer", [ ("str", ["one", "two", "three"], "one"), ("int", [1, 2, 3], 1), ("float", [1.0, 2.0, 3.0], 1.0), ("json", ["[1]", "[2]", "[3]"], [1]), ("yaml", ["- 1", "- 2", "- 3"], [1]), ], ) def test_required_choice_question( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, type_name: str, choices: list[Any], expected_answer: Any, ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): yaml.dump( { "_envops": BRACKET_ENVOPS, "_templates_suffix": SUFFIX_TMPL, "question": { "type": type_name, "choices": choices, }, } ), (src / "[[ _copier_conf.answers_file ]].tmpl"): ( "[[ _copier_answers|to_nice_yaml ]]" ), } ) tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:852: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(yaml)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _______ test_templated_prompt_with_conditional_choices[AWS-iac_choices1] _______ [gw7] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw7'), _trace=._spawn at 0xf41a04d8>, cloud = 'AWS' iac_choices = ['Terraform', 'Cloud Formation', 'Azure Resource Manager (Requires Azure)', 'Deployment Manager (Requires GCP)'] @pytest.mark.parametrize( "cloud, iac_choices", [ ( "Any", [ "Terraform", "Cloud Formation (Requires AWS)", "Azure Resource Manager (Requires Azure)", "Deployment Manager (Requires GCP)", ], ), ( "AWS", [ "Terraform", "Cloud Formation", "Azure Resource Manager (Requires Azure)", "Deployment Manager (Requires GCP)", ], ), ( "Azure", [ "Terraform", "Cloud Formation (Requires AWS)", "Azure Resource Manager", "Deployment Manager (Requires GCP)", ], ), ( "GCP", [ "Terraform", "Cloud Formation (Requires AWS)", "Azure Resource Manager (Requires Azure)", "Deployment Manager", ], ), ], ) def test_templated_prompt_with_conditional_choices( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, cloud: str, iac_choices: str, ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): ( """\ cloud: type: str help: Which cloud provider do you use? choices: - Any - AWS - Azure - GCP iac: type: str help: Which IaC tool do you use? choices: Terraform: tf Cloud Formation: value: cf validator: "{% if cloud != 'AWS' %}Requires AWS{% endif %}" Azure Resource Manager: value: arm validator: "{% if cloud != 'Azure' %}Requires Azure{% endif %}" Deployment Manager: value: dm validator: "{% if cloud != 'GCP' %}Requires GCP{% endif %}" """ ), } ) tui = spawn( COPIER_PATH + ("copy", f"--data=cloud={cloud}", str(src), str(dst)), timeout=10, ) > expect_prompt(tui, "iac", "str", help="Which IaC tool do you use?") tests/test_templated_prompt.py:368: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:148: in expect_prompt tui.expect_exact(help) /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'Which IaC tool do you use?' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _______ test_templated_prompt[questions_data5-copier-expected_outputs5] ________ [gw6] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw6'), _trace=._spawn at 0xf411d2a8> questions_data = {'templated_choices_string_list_1': {'choices': ['[[ main ]]', 'choice 2'], 'default': 'copier'}} expected_value = 'copier' expected_outputs = ['(Use arrow keys)', 'copier', 'choice 2'] @pytest.mark.parametrize( "questions_data, expected_value, expected_outputs", [ ( {"templated_default": {"default": "[[ main ]]default"}}, "copierdefault", [Prompt("templated_default", "str"), "copierdefault"], ), ( { "templated_type": { "type": "[% if main == 'copier' %]int[% endif %]", "default": "0", }, }, 0, [Prompt("templated_type", "int"), "0"], ), ( { "templated_help": { "default": main_default, "help": "THIS [[ main ]] HELP IS TEMPLATED", }, }, main_default, [ Prompt("templated_help", "str", "THIS copier HELP IS TEMPLATED"), "copier", ], ), ( { "templated_choices_dict_1": { "default": "[[ main ]]", "choices": { "choice 1": "[[ main ]]", "[[ main ]]": "value 2", }, }, }, main_default, ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_dict_2": { "default": "value 2", "choices": {"choice 1": "[[ main ]]", "[[ main ]]": "value 2"}, }, }, "value 2", ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_string_list_1": { "default": main_default, "choices": ["[[ main ]]", "choice 2"], }, }, main_default, ["(Use arrow keys)", "copier", "choice 2"], ), ( { "templated_choices_string_list_2": { "default": "choice 1", "choices": ["choice 1", "[[ main ]]"], }, }, "choice 1", ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_tuple_list_1": { "default": main_default, "choices": [["name 1", "[[ main ]]"], ["[[ main ]]", "value 2"]], }, }, main_default, ["(Use arrow keys)", "name 1", "copier"], ), ( { "templated_choices_tuple_list_2": { "default": "value 2", "choices": [["name 1", "[[ main ]]"], ["[[ main ]]", "value 2"]], }, }, "value 2", ["name 1", "copier"], ), ( { "templated_choices_mixed_list": { "default": "value 2", "choices": ["[[ main ]]", ["[[ main ]]", "value 2"]], }, }, "value 2", ["copier", "copier"], ), ], ) def test_templated_prompt( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, questions_data: AnyByStrDict, expected_value: str | int, expected_outputs: Sequence[str | Prompt], ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) questions_combined = {**main_question, **questions_data} # There's always only 1 question; get its name question_name = next(iter(questions_data)) build_file_tree( { (src / "copier.yml"): json.dumps(questions_combined), (src / "[[ _copier_conf.answers_file ]].tmpl"): ( "[[ _copier_answers|to_nice_yaml ]]" ), } ) tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) expect_prompt(tui, "main", "str") tui.expect_exact(main_default) tui.sendline() for output in expected_outputs: if isinstance(output, Prompt): output.expect(tui) else: > tui.expect_exact(output) tests/test_templated_prompt.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(Use arrow keys)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). 🎤 main copier 🎤 main copier Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ____________ test_multiselect_choices_with_templated_default_value _____________ [gw21] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw21'), _trace=._spawn at 0xf424b6b8> def test_multiselect_choices_with_templated_default_value( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): ( """\ python_version: type: str help: What version of python are you targeting? default: "3.11" choices: - "3.8" - "3.9" - "3.10" - "3.11" - "3.12" github_runner_python_version: type: str help: Which Python versions do you want to use on your Github Runner? default: ["{{ python_version }}"] multiselect: true choices: - "3.8" - "3.9" - "3.10" - "3.11" - "3.12" """ ), (src / "{{ _copier_conf.answers_file }}.jinja"): ( "{{ _copier_answers|to_nice_yaml }}" ), } ) tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) > expect_prompt( tui, "python_version", "str", help="What version of python are you targeting?" ) tests/test_templated_prompt.py:545: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:148: in expect_prompt tui.expect_exact(help) /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'What version of python are you targeting?' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ____________________ test_update_multiselect_choices[float] ____________________ [gw1] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 question_tree = .builder at 0xf4275758> copier = .fixture at 0xf4325078>, type_name = 'float' choices = [1.0, 2.0, 3.0], values = [1.0, 2.0, 3.0] @pytest.mark.parametrize("type_name, choices, values", CHOICES) def test_update_multiselect_choices( question_tree: QuestionTreeFixture, copier: CopierFixture, type_name: QuestionType, choices: QuestionChoices, values: ParsedValues, ) -> None: """Multiple choices are properly remembered and selected in TUI when updating.""" src, dst = question_tree( type=type_name, choices=choices, multiselect=True, default=values ) with local.cwd(src): git("init") git("add", ".") git("commit", "-m one") git("tag", "v1") # Copy tui = copier("copy", str(src), str(dst), timeout=10) > expect_prompt(tui, "question", type_name) tests/test_prompt.py:998: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:152: in expect_prompt tui.expect_exact(f"({expected_type})") /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(float)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/checkbox.py", line 225, in checkbox layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _______ test_templated_prompt_with_conditional_choices[Any-iac_choices0] _______ [gw16] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw16'), _trace=._spawn at 0xf4189ed8>, cloud = 'Any' iac_choices = ['Terraform', 'Cloud Formation (Requires AWS)', 'Azure Resource Manager (Requires Azure)', 'Deployment Manager (Requires GCP)'] @pytest.mark.parametrize( "cloud, iac_choices", [ ( "Any", [ "Terraform", "Cloud Formation (Requires AWS)", "Azure Resource Manager (Requires Azure)", "Deployment Manager (Requires GCP)", ], ), ( "AWS", [ "Terraform", "Cloud Formation", "Azure Resource Manager (Requires Azure)", "Deployment Manager (Requires GCP)", ], ), ( "Azure", [ "Terraform", "Cloud Formation (Requires AWS)", "Azure Resource Manager", "Deployment Manager (Requires GCP)", ], ), ( "GCP", [ "Terraform", "Cloud Formation (Requires AWS)", "Azure Resource Manager (Requires Azure)", "Deployment Manager", ], ), ], ) def test_templated_prompt_with_conditional_choices( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, cloud: str, iac_choices: str, ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): ( """\ cloud: type: str help: Which cloud provider do you use? choices: - Any - AWS - Azure - GCP iac: type: str help: Which IaC tool do you use? choices: Terraform: tf Cloud Formation: value: cf validator: "{% if cloud != 'AWS' %}Requires AWS{% endif %}" Azure Resource Manager: value: arm validator: "{% if cloud != 'Azure' %}Requires Azure{% endif %}" Deployment Manager: value: dm validator: "{% if cloud != 'GCP' %}Requires GCP{% endif %}" """ ), } ) tui = spawn( COPIER_PATH + ("copy", f"--data=cloud={cloud}", str(src), str(dst)), timeout=10, ) > expect_prompt(tui, "iac", "str", help="Which IaC tool do you use?") tests/test_templated_prompt.py:368: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:148: in expect_prompt tui.expect_exact(help) /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'Which IaC tool do you use?' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _______ test_templated_prompt_with_templated_choices[Azure-iac_choices2] _______ [gw31] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw31'), _trace=._spawn at 0xf4154028>, cloud = 'Azure' iac_choices = ['Terraform', 'Azure Resource Manager'] @pytest.mark.parametrize( "cloud, iac_choices", [ ("Any", ["Terraform"]), ("AWS", ["Terraform", "Cloud Formation"]), ("Azure", ["Terraform", "Azure Resource Manager"]), ("GCP", ["Terraform", "Deployment Manager"]), ], ) def test_templated_prompt_with_templated_choices( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, cloud: str, iac_choices: str, ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): ( """\ cloud: type: str help: Which cloud provider do you use? choices: - Any - AWS - Azure - GCP iac: type: str help: Which IaC tool do you use? choices: | Terraform: tf {%- if cloud == 'AWS' %} Cloud Formation: cf {%- endif %} {%- if cloud == 'Azure' %} Azure Resource Manager: arm {%- endif %} {%- if cloud == 'GCP' %} Deployment Manager: dm {%- endif %} """ ), } ) tui = spawn( COPIER_PATH + ("copy", f"--data=cloud={cloud}", str(src), str(dst)), timeout=10, ) > expect_prompt(tui, "iac", "str", help="Which IaC tool do you use?") tests/test_templated_prompt.py:425: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:148: in expect_prompt tui.expect_exact(help) /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'Which IaC tool do you use?' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ________ test_templated_prompt_with_templated_choices[Any-iac_choices0] ________ [gw11] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw11'), _trace=._spawn at 0xf4177b68>, cloud = 'Any' iac_choices = ['Terraform'] @pytest.mark.parametrize( "cloud, iac_choices", [ ("Any", ["Terraform"]), ("AWS", ["Terraform", "Cloud Formation"]), ("Azure", ["Terraform", "Azure Resource Manager"]), ("GCP", ["Terraform", "Deployment Manager"]), ], ) def test_templated_prompt_with_templated_choices( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, cloud: str, iac_choices: str, ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): ( """\ cloud: type: str help: Which cloud provider do you use? choices: - Any - AWS - Azure - GCP iac: type: str help: Which IaC tool do you use? choices: | Terraform: tf {%- if cloud == 'AWS' %} Cloud Formation: cf {%- endif %} {%- if cloud == 'Azure' %} Azure Resource Manager: arm {%- endif %} {%- if cloud == 'GCP' %} Deployment Manager: dm {%- endif %} """ ), } ) tui = spawn( COPIER_PATH + ("copy", f"--data=cloud={cloud}", str(src), str(dst)), timeout=10, ) > expect_prompt(tui, "iac", "str", help="Which IaC tool do you use?") tests/test_templated_prompt.py:425: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:148: in expect_prompt tui.expect_exact(help) /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'Which IaC tool do you use?' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _______ test_templated_prompt[questions_data8-value 2-expected_outputs8] _______ [gw4] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw4'), _trace=._spawn at 0xf3e2aa78> questions_data = {'templated_choices_tuple_list_2': {'choices': [['name 1', '[[ main ]]'], ['[[ main ]]', 'value 2']], 'default': 'value 2'}} expected_value = 'value 2', expected_outputs = ['name 1', 'copier'] @pytest.mark.parametrize( "questions_data, expected_value, expected_outputs", [ ( {"templated_default": {"default": "[[ main ]]default"}}, "copierdefault", [Prompt("templated_default", "str"), "copierdefault"], ), ( { "templated_type": { "type": "[% if main == 'copier' %]int[% endif %]", "default": "0", }, }, 0, [Prompt("templated_type", "int"), "0"], ), ( { "templated_help": { "default": main_default, "help": "THIS [[ main ]] HELP IS TEMPLATED", }, }, main_default, [ Prompt("templated_help", "str", "THIS copier HELP IS TEMPLATED"), "copier", ], ), ( { "templated_choices_dict_1": { "default": "[[ main ]]", "choices": { "choice 1": "[[ main ]]", "[[ main ]]": "value 2", }, }, }, main_default, ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_dict_2": { "default": "value 2", "choices": {"choice 1": "[[ main ]]", "[[ main ]]": "value 2"}, }, }, "value 2", ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_string_list_1": { "default": main_default, "choices": ["[[ main ]]", "choice 2"], }, }, main_default, ["(Use arrow keys)", "copier", "choice 2"], ), ( { "templated_choices_string_list_2": { "default": "choice 1", "choices": ["choice 1", "[[ main ]]"], }, }, "choice 1", ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_tuple_list_1": { "default": main_default, "choices": [["name 1", "[[ main ]]"], ["[[ main ]]", "value 2"]], }, }, main_default, ["(Use arrow keys)", "name 1", "copier"], ), ( { "templated_choices_tuple_list_2": { "default": "value 2", "choices": [["name 1", "[[ main ]]"], ["[[ main ]]", "value 2"]], }, }, "value 2", ["name 1", "copier"], ), ( { "templated_choices_mixed_list": { "default": "value 2", "choices": ["[[ main ]]", ["[[ main ]]", "value 2"]], }, }, "value 2", ["copier", "copier"], ), ], ) def test_templated_prompt( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, questions_data: AnyByStrDict, expected_value: str | int, expected_outputs: Sequence[str | Prompt], ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) questions_combined = {**main_question, **questions_data} # There's always only 1 question; get its name question_name = next(iter(questions_data)) build_file_tree( { (src / "copier.yml"): json.dumps(questions_combined), (src / "[[ _copier_conf.answers_file ]].tmpl"): ( "[[ _copier_answers|to_nice_yaml ]]" ), } ) tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) expect_prompt(tui, "main", "str") tui.expect_exact(main_default) tui.sendline() for output in expected_outputs: if isinstance(output, Prompt): output.expect(tui) else: > tui.expect_exact(output) tests/test_templated_prompt.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'name 1' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). 🎤 main copier 🎤 main copier Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ______ test_templated_prompt[questions_data6-choice 1-expected_outputs6] _______ [gw6] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw6'), _trace=._spawn at 0xf4180d98> questions_data = {'templated_choices_string_list_2': {'choices': ['choice 1', '[[ main ]]'], 'default': 'choice 1'}} expected_value = 'choice 1' expected_outputs = ['(Use arrow keys)', 'choice 1', 'copier'] @pytest.mark.parametrize( "questions_data, expected_value, expected_outputs", [ ( {"templated_default": {"default": "[[ main ]]default"}}, "copierdefault", [Prompt("templated_default", "str"), "copierdefault"], ), ( { "templated_type": { "type": "[% if main == 'copier' %]int[% endif %]", "default": "0", }, }, 0, [Prompt("templated_type", "int"), "0"], ), ( { "templated_help": { "default": main_default, "help": "THIS [[ main ]] HELP IS TEMPLATED", }, }, main_default, [ Prompt("templated_help", "str", "THIS copier HELP IS TEMPLATED"), "copier", ], ), ( { "templated_choices_dict_1": { "default": "[[ main ]]", "choices": { "choice 1": "[[ main ]]", "[[ main ]]": "value 2", }, }, }, main_default, ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_dict_2": { "default": "value 2", "choices": {"choice 1": "[[ main ]]", "[[ main ]]": "value 2"}, }, }, "value 2", ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_string_list_1": { "default": main_default, "choices": ["[[ main ]]", "choice 2"], }, }, main_default, ["(Use arrow keys)", "copier", "choice 2"], ), ( { "templated_choices_string_list_2": { "default": "choice 1", "choices": ["choice 1", "[[ main ]]"], }, }, "choice 1", ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_tuple_list_1": { "default": main_default, "choices": [["name 1", "[[ main ]]"], ["[[ main ]]", "value 2"]], }, }, main_default, ["(Use arrow keys)", "name 1", "copier"], ), ( { "templated_choices_tuple_list_2": { "default": "value 2", "choices": [["name 1", "[[ main ]]"], ["[[ main ]]", "value 2"]], }, }, "value 2", ["name 1", "copier"], ), ( { "templated_choices_mixed_list": { "default": "value 2", "choices": ["[[ main ]]", ["[[ main ]]", "value 2"]], }, }, "value 2", ["copier", "copier"], ), ], ) def test_templated_prompt( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, questions_data: AnyByStrDict, expected_value: str | int, expected_outputs: Sequence[str | Prompt], ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) questions_combined = {**main_question, **questions_data} # There's always only 1 question; get its name question_name = next(iter(questions_data)) build_file_tree( { (src / "copier.yml"): json.dumps(questions_combined), (src / "[[ _copier_conf.answers_file ]].tmpl"): ( "[[ _copier_answers|to_nice_yaml ]]" ), } ) tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) expect_prompt(tui, "main", "str") tui.expect_exact(main_default) tui.sendline() for output in expected_outputs: if isinstance(output, Prompt): output.expect(tui) else: > tui.expect_exact(output) tests/test_templated_prompt.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(Use arrow keys)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). 🎤 main copier 🎤 main copier Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ______ test_templated_prompt_with_conditional_choices[Azure-iac_choices2] ______ [gw7] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw7'), _trace=._spawn at 0xf41a16b8>, cloud = 'Azure' iac_choices = ['Terraform', 'Cloud Formation (Requires AWS)', 'Azure Resource Manager', 'Deployment Manager (Requires GCP)'] @pytest.mark.parametrize( "cloud, iac_choices", [ ( "Any", [ "Terraform", "Cloud Formation (Requires AWS)", "Azure Resource Manager (Requires Azure)", "Deployment Manager (Requires GCP)", ], ), ( "AWS", [ "Terraform", "Cloud Formation", "Azure Resource Manager (Requires Azure)", "Deployment Manager (Requires GCP)", ], ), ( "Azure", [ "Terraform", "Cloud Formation (Requires AWS)", "Azure Resource Manager", "Deployment Manager (Requires GCP)", ], ), ( "GCP", [ "Terraform", "Cloud Formation (Requires AWS)", "Azure Resource Manager (Requires Azure)", "Deployment Manager", ], ), ], ) def test_templated_prompt_with_conditional_choices( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, cloud: str, iac_choices: str, ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): ( """\ cloud: type: str help: Which cloud provider do you use? choices: - Any - AWS - Azure - GCP iac: type: str help: Which IaC tool do you use? choices: Terraform: tf Cloud Formation: value: cf validator: "{% if cloud != 'AWS' %}Requires AWS{% endif %}" Azure Resource Manager: value: arm validator: "{% if cloud != 'Azure' %}Requires Azure{% endif %}" Deployment Manager: value: dm validator: "{% if cloud != 'GCP' %}Requires GCP{% endif %}" """ ), } ) tui = spawn( COPIER_PATH + ("copy", f"--data=cloud={cloud}", str(src), str(dst)), timeout=10, ) > expect_prompt(tui, "iac", "str", help="Which IaC tool do you use?") tests/test_templated_prompt.py:368: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:148: in expect_prompt tui.expect_exact(help) /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'Which IaC tool do you use?' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _______ test_templated_prompt[questions_data7-copier-expected_outputs7] ________ [gw0] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw0'), _trace=._spawn at 0xf4277e88> questions_data = {'templated_choices_tuple_list_1': {'choices': [['name 1', '[[ main ]]'], ['[[ main ]]', 'value 2']], 'default': 'copier'}} expected_value = 'copier' expected_outputs = ['(Use arrow keys)', 'name 1', 'copier'] @pytest.mark.parametrize( "questions_data, expected_value, expected_outputs", [ ( {"templated_default": {"default": "[[ main ]]default"}}, "copierdefault", [Prompt("templated_default", "str"), "copierdefault"], ), ( { "templated_type": { "type": "[% if main == 'copier' %]int[% endif %]", "default": "0", }, }, 0, [Prompt("templated_type", "int"), "0"], ), ( { "templated_help": { "default": main_default, "help": "THIS [[ main ]] HELP IS TEMPLATED", }, }, main_default, [ Prompt("templated_help", "str", "THIS copier HELP IS TEMPLATED"), "copier", ], ), ( { "templated_choices_dict_1": { "default": "[[ main ]]", "choices": { "choice 1": "[[ main ]]", "[[ main ]]": "value 2", }, }, }, main_default, ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_dict_2": { "default": "value 2", "choices": {"choice 1": "[[ main ]]", "[[ main ]]": "value 2"}, }, }, "value 2", ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_string_list_1": { "default": main_default, "choices": ["[[ main ]]", "choice 2"], }, }, main_default, ["(Use arrow keys)", "copier", "choice 2"], ), ( { "templated_choices_string_list_2": { "default": "choice 1", "choices": ["choice 1", "[[ main ]]"], }, }, "choice 1", ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_tuple_list_1": { "default": main_default, "choices": [["name 1", "[[ main ]]"], ["[[ main ]]", "value 2"]], }, }, main_default, ["(Use arrow keys)", "name 1", "copier"], ), ( { "templated_choices_tuple_list_2": { "default": "value 2", "choices": [["name 1", "[[ main ]]"], ["[[ main ]]", "value 2"]], }, }, "value 2", ["name 1", "copier"], ), ( { "templated_choices_mixed_list": { "default": "value 2", "choices": ["[[ main ]]", ["[[ main ]]", "value 2"]], }, }, "value 2", ["copier", "copier"], ), ], ) def test_templated_prompt( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, questions_data: AnyByStrDict, expected_value: str | int, expected_outputs: Sequence[str | Prompt], ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) questions_combined = {**main_question, **questions_data} # There's always only 1 question; get its name question_name = next(iter(questions_data)) build_file_tree( { (src / "copier.yml"): json.dumps(questions_combined), (src / "[[ _copier_conf.answers_file ]].tmpl"): ( "[[ _copier_answers|to_nice_yaml ]]" ), } ) tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) expect_prompt(tui, "main", "str") tui.expect_exact(main_default) tui.sendline() for output in expected_outputs: if isinstance(output, Prompt): output.expect(tui) else: > tui.expect_exact(output) tests/test_templated_prompt.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(Use arrow keys)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). 🎤 main copier 🎤 main copier Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _______ test_templated_prompt[questions_data4-value 2-expected_outputs4] _______ [gw18] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw18'), _trace=._spawn at 0xf3961de8> questions_data = {'templated_choices_dict_2': {'choices': {'[[ main ]]': 'value 2', 'choice 1': '[[ main ]]'}, 'default': 'value 2'}} expected_value = 'value 2' expected_outputs = ['(Use arrow keys)', 'choice 1', 'copier'] @pytest.mark.parametrize( "questions_data, expected_value, expected_outputs", [ ( {"templated_default": {"default": "[[ main ]]default"}}, "copierdefault", [Prompt("templated_default", "str"), "copierdefault"], ), ( { "templated_type": { "type": "[% if main == 'copier' %]int[% endif %]", "default": "0", }, }, 0, [Prompt("templated_type", "int"), "0"], ), ( { "templated_help": { "default": main_default, "help": "THIS [[ main ]] HELP IS TEMPLATED", }, }, main_default, [ Prompt("templated_help", "str", "THIS copier HELP IS TEMPLATED"), "copier", ], ), ( { "templated_choices_dict_1": { "default": "[[ main ]]", "choices": { "choice 1": "[[ main ]]", "[[ main ]]": "value 2", }, }, }, main_default, ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_dict_2": { "default": "value 2", "choices": {"choice 1": "[[ main ]]", "[[ main ]]": "value 2"}, }, }, "value 2", ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_string_list_1": { "default": main_default, "choices": ["[[ main ]]", "choice 2"], }, }, main_default, ["(Use arrow keys)", "copier", "choice 2"], ), ( { "templated_choices_string_list_2": { "default": "choice 1", "choices": ["choice 1", "[[ main ]]"], }, }, "choice 1", ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_tuple_list_1": { "default": main_default, "choices": [["name 1", "[[ main ]]"], ["[[ main ]]", "value 2"]], }, }, main_default, ["(Use arrow keys)", "name 1", "copier"], ), ( { "templated_choices_tuple_list_2": { "default": "value 2", "choices": [["name 1", "[[ main ]]"], ["[[ main ]]", "value 2"]], }, }, "value 2", ["name 1", "copier"], ), ( { "templated_choices_mixed_list": { "default": "value 2", "choices": ["[[ main ]]", ["[[ main ]]", "value 2"]], }, }, "value 2", ["copier", "copier"], ), ], ) def test_templated_prompt( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, questions_data: AnyByStrDict, expected_value: str | int, expected_outputs: Sequence[str | Prompt], ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) questions_combined = {**main_question, **questions_data} # There's always only 1 question; get its name question_name = next(iter(questions_data)) build_file_tree( { (src / "copier.yml"): json.dumps(questions_combined), (src / "[[ _copier_conf.answers_file ]].tmpl"): ( "[[ _copier_answers|to_nice_yaml ]]" ), } ) tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) expect_prompt(tui, "main", "str") tui.expect_exact(main_default) tui.sendline() for output in expected_outputs: if isinstance(output, Prompt): output.expect(tui) else: > tui.expect_exact(output) tests/test_templated_prompt.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(Use arrow keys)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). 🎤 main copier 🎤 main copier Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ________ test_templated_prompt_with_templated_choices[AWS-iac_choices1] ________ [gw11] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw11'), _trace=._spawn at 0xf4202d48>, cloud = 'AWS' iac_choices = ['Terraform', 'Cloud Formation'] @pytest.mark.parametrize( "cloud, iac_choices", [ ("Any", ["Terraform"]), ("AWS", ["Terraform", "Cloud Formation"]), ("Azure", ["Terraform", "Azure Resource Manager"]), ("GCP", ["Terraform", "Deployment Manager"]), ], ) def test_templated_prompt_with_templated_choices( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, cloud: str, iac_choices: str, ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): ( """\ cloud: type: str help: Which cloud provider do you use? choices: - Any - AWS - Azure - GCP iac: type: str help: Which IaC tool do you use? choices: | Terraform: tf {%- if cloud == 'AWS' %} Cloud Formation: cf {%- endif %} {%- if cloud == 'Azure' %} Azure Resource Manager: arm {%- endif %} {%- if cloud == 'GCP' %} Deployment Manager: dm {%- endif %} """ ), } ) tui = spawn( COPIER_PATH + ("copy", f"--data=cloud={cloud}", str(src), str(dst)), timeout=10, ) > expect_prompt(tui, "iac", "str", help="Which IaC tool do you use?") tests/test_templated_prompt.py:425: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:148: in expect_prompt tui.expect_exact(help) /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'Which IaC tool do you use?' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _______ test_templated_prompt[questions_data3-copier-expected_outputs3] ________ [gw14] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw14'), _trace=._spawn at 0xf41bdc08> questions_data = {'templated_choices_dict_1': {'choices': {'[[ main ]]': 'value 2', 'choice 1': '[[ main ]]'}, 'default': '[[ main ]]'}} expected_value = 'copier' expected_outputs = ['(Use arrow keys)', 'choice 1', 'copier'] @pytest.mark.parametrize( "questions_data, expected_value, expected_outputs", [ ( {"templated_default": {"default": "[[ main ]]default"}}, "copierdefault", [Prompt("templated_default", "str"), "copierdefault"], ), ( { "templated_type": { "type": "[% if main == 'copier' %]int[% endif %]", "default": "0", }, }, 0, [Prompt("templated_type", "int"), "0"], ), ( { "templated_help": { "default": main_default, "help": "THIS [[ main ]] HELP IS TEMPLATED", }, }, main_default, [ Prompt("templated_help", "str", "THIS copier HELP IS TEMPLATED"), "copier", ], ), ( { "templated_choices_dict_1": { "default": "[[ main ]]", "choices": { "choice 1": "[[ main ]]", "[[ main ]]": "value 2", }, }, }, main_default, ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_dict_2": { "default": "value 2", "choices": {"choice 1": "[[ main ]]", "[[ main ]]": "value 2"}, }, }, "value 2", ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_string_list_1": { "default": main_default, "choices": ["[[ main ]]", "choice 2"], }, }, main_default, ["(Use arrow keys)", "copier", "choice 2"], ), ( { "templated_choices_string_list_2": { "default": "choice 1", "choices": ["choice 1", "[[ main ]]"], }, }, "choice 1", ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_tuple_list_1": { "default": main_default, "choices": [["name 1", "[[ main ]]"], ["[[ main ]]", "value 2"]], }, }, main_default, ["(Use arrow keys)", "name 1", "copier"], ), ( { "templated_choices_tuple_list_2": { "default": "value 2", "choices": [["name 1", "[[ main ]]"], ["[[ main ]]", "value 2"]], }, }, "value 2", ["name 1", "copier"], ), ( { "templated_choices_mixed_list": { "default": "value 2", "choices": ["[[ main ]]", ["[[ main ]]", "value 2"]], }, }, "value 2", ["copier", "copier"], ), ], ) def test_templated_prompt( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, questions_data: AnyByStrDict, expected_value: str | int, expected_outputs: Sequence[str | Prompt], ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) questions_combined = {**main_question, **questions_data} # There's always only 1 question; get its name question_name = next(iter(questions_data)) build_file_tree( { (src / "copier.yml"): json.dumps(questions_combined), (src / "[[ _copier_conf.answers_file ]].tmpl"): ( "[[ _copier_answers|to_nice_yaml ]]" ), } ) tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) expect_prompt(tui, "main", "str") tui.expect_exact(main_default) tui.sendline() for output in expected_outputs: if isinstance(output, Prompt): output.expect(tui) else: > tui.expect_exact(output) tests/test_templated_prompt.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'(Use arrow keys)' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). 🎤 main copier 🎤 main copier Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _______ test_templated_prompt_with_conditional_choices[GCP-iac_choices3] _______ [gw16] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw16'), _trace=._spawn at 0xf37fab68>, cloud = 'GCP' iac_choices = ['Terraform', 'Cloud Formation (Requires AWS)', 'Azure Resource Manager (Requires Azure)', 'Deployment Manager'] @pytest.mark.parametrize( "cloud, iac_choices", [ ( "Any", [ "Terraform", "Cloud Formation (Requires AWS)", "Azure Resource Manager (Requires Azure)", "Deployment Manager (Requires GCP)", ], ), ( "AWS", [ "Terraform", "Cloud Formation", "Azure Resource Manager (Requires Azure)", "Deployment Manager (Requires GCP)", ], ), ( "Azure", [ "Terraform", "Cloud Formation (Requires AWS)", "Azure Resource Manager", "Deployment Manager (Requires GCP)", ], ), ( "GCP", [ "Terraform", "Cloud Formation (Requires AWS)", "Azure Resource Manager (Requires Azure)", "Deployment Manager", ], ), ], ) def test_templated_prompt_with_conditional_choices( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, cloud: str, iac_choices: str, ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): ( """\ cloud: type: str help: Which cloud provider do you use? choices: - Any - AWS - Azure - GCP iac: type: str help: Which IaC tool do you use? choices: Terraform: tf Cloud Formation: value: cf validator: "{% if cloud != 'AWS' %}Requires AWS{% endif %}" Azure Resource Manager: value: arm validator: "{% if cloud != 'Azure' %}Requires Azure{% endif %}" Deployment Manager: value: dm validator: "{% if cloud != 'GCP' %}Requires GCP{% endif %}" """ ), } ) tui = spawn( COPIER_PATH + ("copy", f"--data=cloud={cloud}", str(src), str(dst)), timeout=10, ) > expect_prompt(tui, "iac", "str", help="Which IaC tool do you use?") tests/test_templated_prompt.py:368: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:148: in expect_prompt tui.expect_exact(help) /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'Which IaC tool do you use?' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' _______ test_templated_prompt[questions_data9-value 2-expected_outputs9] _______ [gw1] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw1'), _trace=._spawn at 0xf43253e8> questions_data = {'templated_choices_mixed_list': {'choices': ['[[ main ]]', ['[[ main ]]', 'value 2']], 'default': 'value 2'}} expected_value = 'value 2', expected_outputs = ['copier', 'copier'] @pytest.mark.parametrize( "questions_data, expected_value, expected_outputs", [ ( {"templated_default": {"default": "[[ main ]]default"}}, "copierdefault", [Prompt("templated_default", "str"), "copierdefault"], ), ( { "templated_type": { "type": "[% if main == 'copier' %]int[% endif %]", "default": "0", }, }, 0, [Prompt("templated_type", "int"), "0"], ), ( { "templated_help": { "default": main_default, "help": "THIS [[ main ]] HELP IS TEMPLATED", }, }, main_default, [ Prompt("templated_help", "str", "THIS copier HELP IS TEMPLATED"), "copier", ], ), ( { "templated_choices_dict_1": { "default": "[[ main ]]", "choices": { "choice 1": "[[ main ]]", "[[ main ]]": "value 2", }, }, }, main_default, ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_dict_2": { "default": "value 2", "choices": {"choice 1": "[[ main ]]", "[[ main ]]": "value 2"}, }, }, "value 2", ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_string_list_1": { "default": main_default, "choices": ["[[ main ]]", "choice 2"], }, }, main_default, ["(Use arrow keys)", "copier", "choice 2"], ), ( { "templated_choices_string_list_2": { "default": "choice 1", "choices": ["choice 1", "[[ main ]]"], }, }, "choice 1", ["(Use arrow keys)", "choice 1", "copier"], ), ( { "templated_choices_tuple_list_1": { "default": main_default, "choices": [["name 1", "[[ main ]]"], ["[[ main ]]", "value 2"]], }, }, main_default, ["(Use arrow keys)", "name 1", "copier"], ), ( { "templated_choices_tuple_list_2": { "default": "value 2", "choices": [["name 1", "[[ main ]]"], ["[[ main ]]", "value 2"]], }, }, "value 2", ["name 1", "copier"], ), ( { "templated_choices_mixed_list": { "default": "value 2", "choices": ["[[ main ]]", ["[[ main ]]", "value 2"]], }, }, "value 2", ["copier", "copier"], ), ], ) def test_templated_prompt( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, questions_data: AnyByStrDict, expected_value: str | int, expected_outputs: Sequence[str | Prompt], ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) questions_combined = {**main_question, **questions_data} # There's always only 1 question; get its name question_name = next(iter(questions_data)) build_file_tree( { (src / "copier.yml"): json.dumps(questions_combined), (src / "[[ _copier_conf.answers_file ]].tmpl"): ( "[[ _copier_answers|to_nice_yaml ]]" ), } ) tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) expect_prompt(tui, "main", "str") tui.expect_exact(main_default) tui.sendline() for output in expected_outputs: if isinstance(output, Prompt): output.expect(tui) else: tui.expect_exact(output) tui.sendline() tui.expect_exact(pexpect.EOF) answers = load_answersfile_data(dst) > assert answers[question_name] == expected_value E KeyError: 'templated_choices_mixed_list' tests/test_templated_prompt.py:186: KeyError ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). 🎤 main copier 🎤 main copier 🎤 main copier Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ____________ test_templated_prompt_update_previous_answer_disabled _____________ [gw24] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw24'), _trace=._spawn at 0xf378a898> def test_templated_prompt_update_previous_answer_disabled( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): ( """\ cloud: type: str help: Which cloud provider do you use? choices: - Any - AWS - Azure - GCP iac: type: str help: Which IaC tool do you use? choices: Terraform: tf Cloud Formation: value: cf validator: "{% if cloud != 'AWS' %}Requires AWS{% endif %}" Azure Resource Manager: value: arm validator: "{% if cloud != 'Azure' %}Requires Azure{% endif %}" Deployment Manager: value: dm validator: "{% if cloud != 'GCP' %}Requires GCP{% endif %}" """ ), (src / "{{ _copier_conf.answers_file }}.jinja"): ( "{{ _copier_answers|to_nice_yaml }}" ), } ) with local.cwd(src): git_init("v1") git("tag", "v1") tui = spawn(COPIER_PATH + ("copy", str(src), str(dst)), timeout=10) > expect_prompt(tui, "cloud", "str", help="Which cloud provider do you use?") tests/test_templated_prompt.py:474: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:148: in expect_prompt tui.expect_exact(help) /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'Which cloud provider do you use?' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' ________ test_templated_prompt_with_templated_choices[GCP-iac_choices3] ________ [gw13] linux -- Python 3.12.11 /usr/src/RPM/BUILD/python3-module-copier-9.9.0/.run_venv/bin/python3 tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/usr/src/tmp/pytest-of-builder/pytest-0/popen-gw13'), _trace=._spawn at 0xf40d3d48>, cloud = 'GCP' iac_choices = ['Terraform', 'Deployment Manager'] @pytest.mark.parametrize( "cloud, iac_choices", [ ("Any", ["Terraform"]), ("AWS", ["Terraform", "Cloud Formation"]), ("Azure", ["Terraform", "Azure Resource Manager"]), ("GCP", ["Terraform", "Deployment Manager"]), ], ) def test_templated_prompt_with_templated_choices( tmp_path_factory: pytest.TempPathFactory, spawn: Spawn, cloud: str, iac_choices: str, ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): ( """\ cloud: type: str help: Which cloud provider do you use? choices: - Any - AWS - Azure - GCP iac: type: str help: Which IaC tool do you use? choices: | Terraform: tf {%- if cloud == 'AWS' %} Cloud Formation: cf {%- endif %} {%- if cloud == 'Azure' %} Azure Resource Manager: arm {%- endif %} {%- if cloud == 'GCP' %} Deployment Manager: dm {%- endif %} """ ), } ) tui = spawn( COPIER_PATH + ("copy", f"--data=cloud={cloud}", str(src), str(dst)), timeout=10, ) > expect_prompt(tui, "iac", "str", help="Which IaC tool do you use?") tests/test_templated_prompt.py:425: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/helpers.py:148: in expect_prompt tui.expect_exact(help) /usr/lib/python3/site-packages/pexpect/spawnbase.py:432: in expect_exact return exp.expect_loop(timeout) /usr/lib/python3/site-packages/pexpect/expect.py:179: in expect_loop return self.eof(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = EOF('End Of File (EOF).') def eof(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn._buffer = spawn.buffer_type() spawn._before = spawn.buffer_type() spawn.after = EOF index = self.searcher.eof_index if index >= 0: spawn.match = EOF spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = EOF(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.EOF: End Of File (EOF). E E searcher: searcher_string: E 0: b'Which IaC tool do you use?' /usr/lib/python3/site-packages/pexpect/expect.py:122: EOF ----------------------------- Captured stderr call ----------------------------- Warning: Input is not a terminal (fd=0). Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/__main__.py", line 6, in CopierApp.run() File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 640, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/plumbum/cli/application.py", line 635, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 284, in main return _handle_exceptions(inner) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 71, in _handle_exceptions method() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 275, in inner with self._worker( ^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 271, in __exit__ raise value File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_cli.py", line 282, in inner worker.run_copy() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 95, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 1029, in run_copy self._ask() File "/usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_main.py", line 598, in _ask new_answer = unsafe_prompt( ^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompt.py", line 219, in unsafe_prompt question = create_question_func(**_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/select.py", line 205, in select layout = common.create_inquirer_layout(ic, get_prompt_tokens, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 611, in create_inquirer_layout _fix_unecessary_blank_lines(ps) File "/usr/lib/python3/site-packages/questionary/prompts/common.py", line 591, in _fix_unecessary_blank_lines default_container.get_children()[0].content.get_children()[1].content # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'VSplit' object has no attribute 'content' =============================== warnings summary =============================== tests/test_config.py::test_worker_config_precedence[test_input0-expected_exclusions0] /usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_vcs.py:209: DirtyLocalWarning: Dirty template changes included automatically. warn( tests/test_templated_prompt.py::test_templated_prompt_builtins /usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_user_data.py:50: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). return datetime.utcnow() tests/test_templated_prompt.py::test_templated_prompt_builtins /usr/src/RPM/BUILD/python3-module-copier-9.9.0/tests/test_templated_prompt.py:250: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). assert that_now <= datetime.utcnow() tests/test_unsafe.py::test_update[True-spec_old7-spec_new7-expected7] tests/test_unsafe.py::test_update[True-spec_old7-spec_new7-expected7] /usr/src/RPM/BUILD/python3-module-copier-9.9.0/copier/_template.py:408: DeprecationWarning: This migration configuration is deprecated. Please switch to the new format. warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ SKIPPED [1] tests/test_prompt.py:609: TODO: fix this SKIPPED [1] tests/test_settings.py:30: Windows-only test XFAIL tests/test_updatediff.py::test_update_needs_more_context[False-1] - Not enough context lines to resolve the conflict. XFAIL tests/test_updatediff.py::test_update_needs_more_context[True-2] - Not enough context lines to resolve the conflict. XFAIL tests/test_updatediff.py::test_update_needs_more_context[True-1] - Not enough context lines to resolve the conflict. XFAIL tests/test_updatediff.py::test_update_needs_more_context[False-2] - Not enough context lines to resolve the conflict. FAILED tests/test_complex_questions.py::test_cli_interactive - pexpect.except... FAILED tests/test_complex_questions.py::test_selection_type_cast - pexpect.ex... FAILED tests/test_prompt.py::test_update_choice[choices2] - pexpect.exception... FAILED tests/test_prompt.py::test_required_choice_question[float-choices2-1.0] FAILED tests/test_prompt.py::test_multiselect_choices_question_multiple_answers[int-label-dict] FAILED tests/test_prompt.py::test_required_choice_question[str-choices0-one] FAILED tests/test_prompt.py::test_multiselect_choices_question_single_answer[float] FAILED tests/test_prompt.py::test_multiselect_choices_question_single_answer[yaml] FAILED tests/test_prompt.py::test_multiselect_choices_question_single_answer[int-label-list] FAILED tests/test_prompt.py::test_multiselect_choices_question_multiple_answers[int] FAILED tests/test_prompt.py::test_multiselect_choices_question_multiple_answers[json] FAILED tests/test_prompt.py::test_multiselect_choices_question_with_default[float] FAILED tests/test_prompt.py::test_multiselect_choices_question_with_default[str] FAILED tests/test_prompt.py::test_update_choice[choices0] - pexpect.exception... FAILED tests/test_prompt.py::test_multiselect_choices_question_with_default[yaml] FAILED tests/test_prompt.py::test_multiselect_choices_question_single_answer[str] FAILED tests/test_prompt.py::test_update_multiselect_choices[int] - pexpect.e... FAILED tests/test_prompt.py::test_multiselect_choices_question_with_default[int-label-list] FAILED tests/test_prompt.py::test_multiselect_choices_validator - pexpect.exc... FAILED tests/test_prompt.py::test_required_choice_question[json-choices3-expected_answer3] FAILED tests/test_prompt.py::test_update_multiselect_choices[json] - pexpect.... FAILED tests/test_prompt.py::test_update_multiselect_choices[int-label-dict] FAILED tests/test_prompt.py::test_multiselect_choices_question_multiple_answers[float] FAILED tests/test_prompt.py::test_required_choice_question[int-choices1-1] - ... FAILED tests/test_prompt.py::test_multiselect_choices_question_multiple_answers[yaml] FAILED tests/test_prompt.py::test_multiselect_choices_question_single_answer[int-label-dict] FAILED tests/test_prompt.py::test_multiselect_choices_question_multiple_answers[str] FAILED tests/test_prompt.py::test_multiselect_choices_question_with_default[json] FAILED tests/test_prompt.py::test_multiselect_choices_question_single_answer[json] FAILED tests/test_prompt.py::test_multiselect_choices_question_multiple_answers[int-label-list] FAILED tests/test_prompt.py::test_multiselect_choices_question_with_default[int] FAILED tests/test_prompt.py::test_update_choice[choices1] - pexpect.exception... FAILED tests/test_prompt.py::test_multiselect_choices_question_single_answer[int] FAILED tests/test_prompt.py::test_update_multiselect_choices[str] - KeyError:... FAILED tests/test_prompt.py::test_update_multiselect_choices[int-label-list] FAILED tests/test_prompt.py::test_multiselect_choices_question_with_default[int-label-dict] FAILED tests/test_prompt.py::test_update_multiselect_choices[yaml] - pexpect.... FAILED tests/test_prompt.py::test_required_choice_question[yaml-choices4-expected_answer4] FAILED tests/test_templated_prompt.py::test_templated_prompt_with_conditional_choices[AWS-iac_choices1] FAILED tests/test_templated_prompt.py::test_templated_prompt[questions_data5-copier-expected_outputs5] FAILED tests/test_templated_prompt.py::test_multiselect_choices_with_templated_default_value FAILED tests/test_prompt.py::test_update_multiselect_choices[float] - pexpect... FAILED tests/test_templated_prompt.py::test_templated_prompt_with_conditional_choices[Any-iac_choices0] FAILED tests/test_templated_prompt.py::test_templated_prompt_with_templated_choices[Azure-iac_choices2] FAILED tests/test_templated_prompt.py::test_templated_prompt_with_templated_choices[Any-iac_choices0] FAILED tests/test_templated_prompt.py::test_templated_prompt[questions_data8-value 2-expected_outputs8] FAILED tests/test_templated_prompt.py::test_templated_prompt[questions_data6-choice 1-expected_outputs6] FAILED tests/test_templated_prompt.py::test_templated_prompt_with_conditional_choices[Azure-iac_choices2] FAILED tests/test_templated_prompt.py::test_templated_prompt[questions_data7-copier-expected_outputs7] FAILED tests/test_templated_prompt.py::test_templated_prompt[questions_data4-value 2-expected_outputs4] FAILED tests/test_templated_prompt.py::test_templated_prompt_with_templated_choices[AWS-iac_choices1] FAILED tests/test_templated_prompt.py::test_templated_prompt[questions_data3-copier-expected_outputs3] FAILED tests/test_templated_prompt.py::test_templated_prompt_with_conditional_choices[GCP-iac_choices3] FAILED tests/test_templated_prompt.py::test_templated_prompt[questions_data9-value 2-expected_outputs9] FAILED tests/test_templated_prompt.py::test_templated_prompt_update_previous_answer_disabled FAILED tests/test_templated_prompt.py::test_templated_prompt_with_templated_choices[GCP-iac_choices3] = 56 failed, 901 passed, 2 skipped, 4 xfailed, 5 warnings in 88.83s (0:01:28) == INFO : Command's result: FAILURE INFO : Command's error: Command '['python3', '-m', 'pytest', '--deselect', 'tests/test_copy.py::test_copy_repo', '--deselect', 'tests/test_vcs.py::test_clone', '--deselect', 'tests/test_vcs.py::test_shallow_clone', '--deselect', 'tests/test_vcs.py::test_local_clone', '--deselect', 'tests/test_vcs.py::test_removes_temporary_clone', '--deselect', 'tests/test_vcs.py::test_dont_remove_local_clone', '--deselect', 'tests/test_vcs.py::test_update_using_local_source_path_with_tilde', '--deselect', 'tests/test_updatediff.py::test_commit_hooks_respected', '--deselect', 'tests/test_tools.py::test_types', '--deselect', 'tests/test_prompt.py::test_path_completion']' returned non-zero exit status 1. error: Bad exit status from /usr/src/tmp/rpm-tmp.5478 (%check) RPM build errors: Bad exit status from /usr/src/tmp/rpm-tmp.5478 (%check) Command exited with non-zero status 1 580.07user 194.95system 1:36.09elapsed 806%CPU (0avgtext+0avgdata 52612maxresident)k 0inputs+0outputs (0major+13947371minor)pagefaults 0swaps hsh-rebuild: rebuild of `python3-module-copier-9.9.0-alt1.src.rpm' failed. Command exited with non-zero status 1 6.65user 3.43system 1:59.52elapsed 8%CPU (0avgtext+0avgdata 135696maxresident)k 20048inputs+0outputs (0major+356315minor)pagefaults 0swaps