0s autopkgtest [09:18:55]: starting date and time: 2025-03-13 09:18:55+0000 0s autopkgtest [09:18:55]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [09:18:55]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.bzo6h9zr/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:poetry,src:dbus-fast,src:poetry-core --apt-upgrade poetry-plugin-export --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=poetry/2.1.1+dfsg-1 dbus-fast/2.39.3-1 poetry-core/2.1.1-1' -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@bos03-arm64-22.secgroup --name adt-plucky-arm64-poetry-plugin-export-20250313-091853-juju-7f2275-prod-proposed-migration-environment-2-cc11e995-1cb5-4597-9877-e8c73dbec8ba --image adt/ubuntu-plucky-arm64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-proposed-migration -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 95s autopkgtest [09:20:30]: testbed dpkg architecture: arm64 95s autopkgtest [09:20:30]: testbed apt version: 2.9.32ubuntu1 95s autopkgtest [09:20:30]: @@@@@@@@@@@@@@@@@@@@ test bed setup 95s autopkgtest [09:20:30]: testbed release detected to be: None 96s autopkgtest [09:20:31]: updating testbed package index (apt update) 97s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [110 kB] 97s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 97s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 97s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 97s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [11.5 kB] 97s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [429 kB] 97s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [44.2 kB] 97s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 Packages [55.9 kB] 97s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 Packages [370 kB] 97s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse arm64 Packages [3244 B] 97s Fetched 1024 kB in 1s (1104 kB/s) 98s Reading package lists... 99s Reading package lists... 99s Building dependency tree... 99s Reading state information... 100s Calculating upgrade... 100s Calculating upgrade... 100s The following packages will be upgraded: 100s gir1.2-glib-2.0 htop libglib2.0-0t64 libglib2.0-data 100s 4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 100s Need to get 1982 kB of archives. 100s After this operation, 0 B of additional disk space will be used. 100s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 gir1.2-glib-2.0 arm64 2.84.0-1 [185 kB] 100s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 libglib2.0-0t64 arm64 2.84.0-1 [1571 kB] 101s Get:3 http://ftpmaster.internal/ubuntu plucky/main arm64 libglib2.0-data all 2.84.0-1 [53.0 kB] 101s Get:4 http://ftpmaster.internal/ubuntu plucky/main arm64 htop arm64 3.4.0-2 [173 kB] 101s Fetched 1982 kB in 1s (3083 kB/s) 101s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 117763 files and directories currently installed.) 101s Preparing to unpack .../gir1.2-glib-2.0_2.84.0-1_arm64.deb ... 101s Unpacking gir1.2-glib-2.0:arm64 (2.84.0-1) over (2.83.5-1) ... 102s Preparing to unpack .../libglib2.0-0t64_2.84.0-1_arm64.deb ... 102s Unpacking libglib2.0-0t64:arm64 (2.84.0-1) over (2.83.5-1) ... 102s Preparing to unpack .../libglib2.0-data_2.84.0-1_all.deb ... 102s Unpacking libglib2.0-data (2.84.0-1) over (2.83.5-1) ... 102s Preparing to unpack .../htop_3.4.0-2_arm64.deb ... 102s Unpacking htop (3.4.0-2) over (3.4.0-1) ... 102s Setting up htop (3.4.0-2) ... 102s Setting up libglib2.0-0t64:arm64 (2.84.0-1) ... 102s No schema files found: doing nothing. 102s Setting up libglib2.0-data (2.84.0-1) ... 102s Setting up gir1.2-glib-2.0:arm64 (2.84.0-1) ... 102s Processing triggers for man-db (2.13.0-1) ... 102s Processing triggers for libc-bin (2.41-1ubuntu1) ... 103s Reading package lists... 103s Building dependency tree... 103s Reading state information... 103s Solving dependencies... 104s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 104s autopkgtest [09:20:39]: upgrading testbed (apt dist-upgrade and autopurge) 104s Reading package lists... 104s Building dependency tree... 104s Reading state information... 105s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 105s Starting 2 pkgProblemResolver with broken count: 0 105s Done 105s Entering ResolveByKeep 106s 106s Calculating upgrade... 106s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 106s Reading package lists... 107s Building dependency tree... 107s Reading state information... 107s Starting pkgProblemResolver with broken count: 0 107s Starting 2 pkgProblemResolver with broken count: 0 107s Done 107s Solving dependencies... 108s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 111s autopkgtest [09:20:46]: testbed running kernel: Linux 6.14.0-7-generic #7-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 28 11:47:29 UTC 2025 111s autopkgtest [09:20:46]: @@@@@@@@@@@@@@@@@@@@ apt-source poetry-plugin-export 112s Get:1 http://ftpmaster.internal/ubuntu plucky/universe poetry-plugin-export 1.9.0-1 (dsc) [2323 B] 112s Get:2 http://ftpmaster.internal/ubuntu plucky/universe poetry-plugin-export 1.9.0-1 (tar) [77.4 kB] 112s Get:3 http://ftpmaster.internal/ubuntu plucky/universe poetry-plugin-export 1.9.0-1 (diff) [2336 B] 112s gpgv: Signature made Thu Jan 23 02:44:17 2025 UTC 112s gpgv: using RSA key 13796755BBC72BB8ABE2AEB5FA9DEC5DE11C63F1 112s gpgv: issuer "eamanu@debian.org" 112s gpgv: Can't check signature: No public key 112s dpkg-source: warning: cannot verify inline signature for ./poetry-plugin-export_1.9.0-1.dsc: no acceptable signature found 113s autopkgtest [09:20:48]: testing package poetry-plugin-export version 1.9.0-1 113s autopkgtest [09:20:48]: build not needed 113s autopkgtest [09:20:48]: test pybuild-autopkgtest: preparing testbed 114s Reading package lists... 114s Building dependency tree... 114s Reading state information... 114s Starting pkgProblemResolver with broken count: 0 114s Starting 2 pkgProblemResolver with broken count: 0 114s Done 115s The following NEW packages will be installed: 115s autoconf automake autopoint autotools-dev build-essential cpp cpp-14 115s cpp-14-aarch64-linux-gnu cpp-aarch64-linux-gnu debhelper debugedit 115s dh-autoreconf dh-python dh-strip-nondeterminism dwz g++ g++-14 115s g++-14-aarch64-linux-gnu g++-aarch64-linux-gnu gcc gcc-14 115s gcc-14-aarch64-linux-gnu gcc-aarch64-linux-gnu gettext intltool-debian 115s libarchive-zip-perl libasan8 libcc1-0 libdebhelper-perl 115s libfile-stripnondeterminism-perl libgcc-14-dev libgomp1 libhwasan0 libisl23 115s libitm1 libjs-jquery libjs-jquery-hotkeys libjs-jquery-isonscreen 115s libjs-jquery-metadata libjs-jquery-tablesorter 115s libjs-jquery-throttle-debounce liblsan0 libmpc3 libstdc++-14-dev libtool 115s libtsan2 libubsan1 m4 po-debconf pybuild-plugin-autopkgtest 115s pybuild-plugin-pyproject python3-all python3-build python3-cachecontrol 115s python3-cleo python3-coverage python3-distlib python3-dulwich 115s python3-execnet python3-fastjsonschema python3-filelock python3-findpython 115s python3-importlib-metadata python3-iniconfig python3-installer 115s python3-jaraco.classes python3-jeepney python3-keyring python3-msgpack 115s python3-packaging python3-pbs-installer python3-pip-whl python3-pkginfo 115s python3-platformdirs python3-pluggy python3-poetry python3-poetry-core 115s python3-poetry-plugin-export python3-pyproject-hooks python3-pytest 115s python3-pytest-cov python3-pytest-mock python3-pytest-xdist 115s python3-rapidfuzz python3-requests-toolbelt python3-secretstorage 115s python3-setuptools-whl python3-shellingham python3-toml python3-tomlkit 115s python3-trove-classifiers python3-virtualenv python3-wheel python3-wheel-whl 115s 0 upgraded, 94 newly installed, 0 to remove and 0 not upgraded. 115s Need to get 71.1 MB of archives. 115s After this operation, 243 MB of additional disk space will be used. 115s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 m4 arm64 1.4.19-7 [244 kB] 116s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 autoconf all 2.72-3ubuntu1 [383 kB] 116s Get:3 http://ftpmaster.internal/ubuntu plucky/main arm64 autotools-dev all 20220109.1 [44.9 kB] 116s Get:4 http://ftpmaster.internal/ubuntu plucky/main arm64 automake all 1:1.17-3ubuntu1 [572 kB] 116s Get:5 http://ftpmaster.internal/ubuntu plucky/main arm64 autopoint all 0.23.1-1 [619 kB] 116s Get:6 http://ftpmaster.internal/ubuntu plucky/main arm64 libisl23 arm64 0.27-1 [676 kB] 116s Get:7 http://ftpmaster.internal/ubuntu plucky/main arm64 libmpc3 arm64 1.3.1-1build2 [56.8 kB] 116s Get:8 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu3 [10.6 MB] 118s Get:9 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp-14 arm64 14.2.0-17ubuntu3 [1028 B] 118s Get:10 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [5558 B] 118s Get:11 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp arm64 4:14.2.0-1ubuntu1 [22.4 kB] 118s Get:12 http://ftpmaster.internal/ubuntu plucky/main arm64 libcc1-0 arm64 15-20250222-0ubuntu1 [44.2 kB] 118s Get:13 http://ftpmaster.internal/ubuntu plucky/main arm64 libgomp1 arm64 15-20250222-0ubuntu1 [146 kB] 118s Get:14 http://ftpmaster.internal/ubuntu plucky/main arm64 libitm1 arm64 15-20250222-0ubuntu1 [28.0 kB] 118s Get:15 http://ftpmaster.internal/ubuntu plucky/main arm64 libasan8 arm64 15-20250222-0ubuntu1 [2924 kB] 118s Get:16 http://ftpmaster.internal/ubuntu plucky/main arm64 liblsan0 arm64 15-20250222-0ubuntu1 [1319 kB] 118s Get:17 http://ftpmaster.internal/ubuntu plucky/main arm64 libtsan2 arm64 15-20250222-0ubuntu1 [2694 kB] 119s Get:18 http://ftpmaster.internal/ubuntu plucky/main arm64 libubsan1 arm64 15-20250222-0ubuntu1 [1178 kB] 119s Get:19 http://ftpmaster.internal/ubuntu plucky/main arm64 libhwasan0 arm64 15-20250222-0ubuntu1 [1642 kB] 119s Get:20 http://ftpmaster.internal/ubuntu plucky/main arm64 libgcc-14-dev arm64 14.2.0-17ubuntu3 [2593 kB] 119s Get:21 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu3 [20.9 MB] 120s Get:22 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc-14 arm64 14.2.0-17ubuntu3 [526 kB] 120s Get:23 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [1200 B] 120s Get:24 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc arm64 4:14.2.0-1ubuntu1 [4998 B] 120s Get:25 http://ftpmaster.internal/ubuntu plucky/main arm64 libstdc++-14-dev arm64 14.2.0-17ubuntu3 [2499 kB] 120s Get:26 http://ftpmaster.internal/ubuntu plucky/main arm64 g++-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu3 [12.1 MB] 121s Get:27 http://ftpmaster.internal/ubuntu plucky/main arm64 g++-14 arm64 14.2.0-17ubuntu3 [21.8 kB] 121s Get:28 http://ftpmaster.internal/ubuntu plucky/main arm64 g++-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [956 B] 121s Get:29 http://ftpmaster.internal/ubuntu plucky/main arm64 g++ arm64 4:14.2.0-1ubuntu1 [1080 B] 121s Get:30 http://ftpmaster.internal/ubuntu plucky/main arm64 build-essential arm64 12.10ubuntu1 [4932 B] 121s Get:31 http://ftpmaster.internal/ubuntu plucky/main arm64 libdebhelper-perl all 13.24.1ubuntu2 [95.4 kB] 121s Get:32 http://ftpmaster.internal/ubuntu plucky/main arm64 libtool all 2.5.4-4 [168 kB] 121s Get:33 http://ftpmaster.internal/ubuntu plucky/main arm64 dh-autoreconf all 20 [16.1 kB] 121s Get:34 http://ftpmaster.internal/ubuntu plucky/main arm64 libarchive-zip-perl all 1.68-1 [90.2 kB] 121s Get:35 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-stripnondeterminism-perl all 1.14.1-2 [20.3 kB] 121s Get:36 http://ftpmaster.internal/ubuntu plucky/main arm64 dh-strip-nondeterminism all 1.14.1-2 [5064 B] 121s Get:37 http://ftpmaster.internal/ubuntu plucky/main arm64 debugedit arm64 1:5.1-2 [46.1 kB] 121s Get:38 http://ftpmaster.internal/ubuntu plucky/main arm64 dwz arm64 0.15-1build6 [113 kB] 121s Get:39 http://ftpmaster.internal/ubuntu plucky/main arm64 gettext arm64 0.23.1-1 [998 kB] 121s Get:40 http://ftpmaster.internal/ubuntu plucky/main arm64 intltool-debian all 0.35.0+20060710.6 [23.2 kB] 121s Get:41 http://ftpmaster.internal/ubuntu plucky/main arm64 po-debconf all 1.0.21+nmu1 [233 kB] 121s Get:42 http://ftpmaster.internal/ubuntu plucky/main arm64 debhelper all 13.24.1ubuntu2 [895 kB] 121s Get:43 http://ftpmaster.internal/ubuntu plucky/universe arm64 dh-python all 6.20250308 [118 kB] 121s Get:44 http://ftpmaster.internal/ubuntu plucky/main arm64 libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 121s Get:45 http://ftpmaster.internal/ubuntu plucky/universe arm64 libjs-jquery-metadata all 12-4 [6582 B] 121s Get:46 http://ftpmaster.internal/ubuntu plucky/universe arm64 libjs-jquery-tablesorter all 1:2.31.3+dfsg1-4 [192 kB] 121s Get:47 http://ftpmaster.internal/ubuntu plucky/universe arm64 libjs-jquery-throttle-debounce all 1.1+dfsg.1-2 [12.5 kB] 121s Get:48 http://ftpmaster.internal/ubuntu plucky/universe arm64 pybuild-plugin-autopkgtest all 6.20250308 [1744 B] 121s Get:49 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-importlib-metadata all 8.6.1-1 [20.7 kB] 121s Get:50 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-packaging all 24.2-1 [51.5 kB] 121s Get:51 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-pyproject-hooks all 1.2.0-1 [10.2 kB] 121s Get:52 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-toml all 0.10.2-1 [16.5 kB] 121s Get:53 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-wheel all 0.45.1-1 [57.7 kB] 121s Get:54 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-build all 1.2.2-1 [31.0 kB] 121s Get:55 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-installer all 0.7.0+dfsg1-3 [17.4 kB] 121s Get:56 http://ftpmaster.internal/ubuntu plucky/universe arm64 pybuild-plugin-pyproject all 6.20250308 [1726 B] 121s Get:57 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-all arm64 3.13.2-2 [886 B] 121s Get:58 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-msgpack arm64 1.0.3-3build4 [82.7 kB] 121s Get:59 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-cachecontrol all 0.14.2-1 [18.7 kB] 121s Get:60 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-rapidfuzz arm64 3.12.1+ds-1build1 [1028 kB] 121s Get:61 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-cleo all 2.2.1-4 [52.4 kB] 121s Get:62 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-coverage arm64 7.6.0+dfsg1-2build1 [153 kB] 122s Get:63 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-distlib all 0.3.9-1 [267 kB] 122s Get:64 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-dulwich arm64 0.22.7-1 [183 kB] 122s Get:65 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-execnet all 2.1.1-1 [33.4 kB] 122s Get:66 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-fastjsonschema all 2.21.1-1 [20.4 kB] 122s Get:67 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-filelock all 3.17.0-1 [13.0 kB] 122s Get:68 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-findpython all 0.6.2-1 [15.3 kB] 122s Get:69 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-iniconfig all 1.1.1-2 [6024 B] 122s Get:70 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-jaraco.classes all 3.4.0-1 [7664 B] 122s Get:71 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-jeepney all 0.8.0-4 [33.1 kB] 122s Get:72 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-secretstorage all 3.3.3-3 [13.7 kB] 122s Get:73 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-keyring all 25.6.0-1 [40.6 kB] 122s Get:74 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-pbs-installer all 2025.02.12-2 [43.8 kB] 122s Get:75 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-pip-whl all 25.0+dfsg-1 [1446 kB] 122s Get:76 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-pkginfo all 1.12.1.2-2 [17.4 kB] 122s Get:77 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-platformdirs all 4.3.6-1 [16.8 kB] 122s Get:78 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-pluggy all 1.5.0-1 [21.0 kB] 122s Get:79 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 python3-poetry-core all 2.1.1-1 [221 kB] 122s Get:80 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-requests-toolbelt all 1.0.0-4 [37.0 kB] 122s Get:81 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-shellingham all 1.5.4-1 [9482 B] 122s Get:82 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-tomlkit all 0.13.2-1 [37.6 kB] 122s Get:83 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-trove-classifiers all 2025.1.15.22-1 [10.9 kB] 122s Get:84 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-setuptools-whl all 75.8.0-1 [1152 kB] 122s Get:85 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-wheel-whl all 0.45.1-1 [74.6 kB] 122s Get:86 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-virtualenv all 20.29.1+ds-1 [72.6 kB] 122s Get:87 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 python3-poetry all 2.1.1+dfsg-1 [165 kB] 122s Get:88 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-poetry-plugin-export all 1.9.0-1 [10.3 kB] 122s Get:89 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-pytest all 8.3.4-1 [252 kB] 122s Get:90 http://ftpmaster.internal/ubuntu plucky/universe arm64 libjs-jquery-hotkeys all 0.2.0-1 [13.3 kB] 122s Get:91 http://ftpmaster.internal/ubuntu plucky/universe arm64 libjs-jquery-isonscreen all 1.2.0-1.1 [3244 B] 122s Get:92 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-pytest-cov all 5.0.0-1 [21.3 kB] 122s Get:93 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-pytest-mock all 3.14.0-2 [11.7 kB] 122s Get:94 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-pytest-xdist all 3.6.1-1 [33.8 kB] 122s Fetched 71.1 MB in 7s (10.5 MB/s) 122s Selecting previously unselected package m4. 123s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 117763 files and directories currently installed.) 123s Preparing to unpack .../00-m4_1.4.19-7_arm64.deb ... 123s Unpacking m4 (1.4.19-7) ... 123s Selecting previously unselected package autoconf. 123s Preparing to unpack .../01-autoconf_2.72-3ubuntu1_all.deb ... 123s Unpacking autoconf (2.72-3ubuntu1) ... 123s Selecting previously unselected package autotools-dev. 123s Preparing to unpack .../02-autotools-dev_20220109.1_all.deb ... 123s Unpacking autotools-dev (20220109.1) ... 123s Selecting previously unselected package automake. 123s Preparing to unpack .../03-automake_1%3a1.17-3ubuntu1_all.deb ... 123s Unpacking automake (1:1.17-3ubuntu1) ... 123s Selecting previously unselected package autopoint. 123s Preparing to unpack .../04-autopoint_0.23.1-1_all.deb ... 123s Unpacking autopoint (0.23.1-1) ... 123s Selecting previously unselected package libisl23:arm64. 123s Preparing to unpack .../05-libisl23_0.27-1_arm64.deb ... 123s Unpacking libisl23:arm64 (0.27-1) ... 123s Selecting previously unselected package libmpc3:arm64. 123s Preparing to unpack .../06-libmpc3_1.3.1-1build2_arm64.deb ... 123s Unpacking libmpc3:arm64 (1.3.1-1build2) ... 123s Selecting previously unselected package cpp-14-aarch64-linux-gnu. 123s Preparing to unpack .../07-cpp-14-aarch64-linux-gnu_14.2.0-17ubuntu3_arm64.deb ... 123s Unpacking cpp-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 123s Selecting previously unselected package cpp-14. 123s Preparing to unpack .../08-cpp-14_14.2.0-17ubuntu3_arm64.deb ... 123s Unpacking cpp-14 (14.2.0-17ubuntu3) ... 123s Selecting previously unselected package cpp-aarch64-linux-gnu. 123s Preparing to unpack .../09-cpp-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 123s Unpacking cpp-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 123s Selecting previously unselected package cpp. 123s Preparing to unpack .../10-cpp_4%3a14.2.0-1ubuntu1_arm64.deb ... 123s Unpacking cpp (4:14.2.0-1ubuntu1) ... 123s Selecting previously unselected package libcc1-0:arm64. 123s Preparing to unpack .../11-libcc1-0_15-20250222-0ubuntu1_arm64.deb ... 123s Unpacking libcc1-0:arm64 (15-20250222-0ubuntu1) ... 123s Selecting previously unselected package libgomp1:arm64. 123s Preparing to unpack .../12-libgomp1_15-20250222-0ubuntu1_arm64.deb ... 123s Unpacking libgomp1:arm64 (15-20250222-0ubuntu1) ... 123s Selecting previously unselected package libitm1:arm64. 123s Preparing to unpack .../13-libitm1_15-20250222-0ubuntu1_arm64.deb ... 123s Unpacking libitm1:arm64 (15-20250222-0ubuntu1) ... 123s Selecting previously unselected package libasan8:arm64. 123s Preparing to unpack .../14-libasan8_15-20250222-0ubuntu1_arm64.deb ... 123s Unpacking libasan8:arm64 (15-20250222-0ubuntu1) ... 123s Selecting previously unselected package liblsan0:arm64. 123s Preparing to unpack .../15-liblsan0_15-20250222-0ubuntu1_arm64.deb ... 123s Unpacking liblsan0:arm64 (15-20250222-0ubuntu1) ... 124s Selecting previously unselected package libtsan2:arm64. 124s Preparing to unpack .../16-libtsan2_15-20250222-0ubuntu1_arm64.deb ... 124s Unpacking libtsan2:arm64 (15-20250222-0ubuntu1) ... 124s Selecting previously unselected package libubsan1:arm64. 124s Preparing to unpack .../17-libubsan1_15-20250222-0ubuntu1_arm64.deb ... 124s Unpacking libubsan1:arm64 (15-20250222-0ubuntu1) ... 124s Selecting previously unselected package libhwasan0:arm64. 124s Preparing to unpack .../18-libhwasan0_15-20250222-0ubuntu1_arm64.deb ... 124s Unpacking libhwasan0:arm64 (15-20250222-0ubuntu1) ... 124s Selecting previously unselected package libgcc-14-dev:arm64. 124s Preparing to unpack .../19-libgcc-14-dev_14.2.0-17ubuntu3_arm64.deb ... 124s Unpacking libgcc-14-dev:arm64 (14.2.0-17ubuntu3) ... 124s Selecting previously unselected package gcc-14-aarch64-linux-gnu. 124s Preparing to unpack .../20-gcc-14-aarch64-linux-gnu_14.2.0-17ubuntu3_arm64.deb ... 124s Unpacking gcc-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 124s Selecting previously unselected package gcc-14. 124s Preparing to unpack .../21-gcc-14_14.2.0-17ubuntu3_arm64.deb ... 124s Unpacking gcc-14 (14.2.0-17ubuntu3) ... 124s Selecting previously unselected package gcc-aarch64-linux-gnu. 124s Preparing to unpack .../22-gcc-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 124s Unpacking gcc-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 124s Selecting previously unselected package gcc. 124s Preparing to unpack .../23-gcc_4%3a14.2.0-1ubuntu1_arm64.deb ... 124s Unpacking gcc (4:14.2.0-1ubuntu1) ... 124s Selecting previously unselected package libstdc++-14-dev:arm64. 124s Preparing to unpack .../24-libstdc++-14-dev_14.2.0-17ubuntu3_arm64.deb ... 124s Unpacking libstdc++-14-dev:arm64 (14.2.0-17ubuntu3) ... 125s Selecting previously unselected package g++-14-aarch64-linux-gnu. 125s Preparing to unpack .../25-g++-14-aarch64-linux-gnu_14.2.0-17ubuntu3_arm64.deb ... 125s Unpacking g++-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 125s Selecting previously unselected package g++-14. 125s Preparing to unpack .../26-g++-14_14.2.0-17ubuntu3_arm64.deb ... 125s Unpacking g++-14 (14.2.0-17ubuntu3) ... 125s Selecting previously unselected package g++-aarch64-linux-gnu. 125s Preparing to unpack .../27-g++-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 125s Unpacking g++-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 125s Selecting previously unselected package g++. 125s Preparing to unpack .../28-g++_4%3a14.2.0-1ubuntu1_arm64.deb ... 125s Unpacking g++ (4:14.2.0-1ubuntu1) ... 125s Selecting previously unselected package build-essential. 125s Preparing to unpack .../29-build-essential_12.10ubuntu1_arm64.deb ... 125s Unpacking build-essential (12.10ubuntu1) ... 125s Selecting previously unselected package libdebhelper-perl. 125s Preparing to unpack .../30-libdebhelper-perl_13.24.1ubuntu2_all.deb ... 125s Unpacking libdebhelper-perl (13.24.1ubuntu2) ... 125s Selecting previously unselected package libtool. 125s Preparing to unpack .../31-libtool_2.5.4-4_all.deb ... 125s Unpacking libtool (2.5.4-4) ... 125s Selecting previously unselected package dh-autoreconf. 125s Preparing to unpack .../32-dh-autoreconf_20_all.deb ... 125s Unpacking dh-autoreconf (20) ... 125s Selecting previously unselected package libarchive-zip-perl. 125s Preparing to unpack .../33-libarchive-zip-perl_1.68-1_all.deb ... 125s Unpacking libarchive-zip-perl (1.68-1) ... 125s Selecting previously unselected package libfile-stripnondeterminism-perl. 125s Preparing to unpack .../34-libfile-stripnondeterminism-perl_1.14.1-2_all.deb ... 125s Unpacking libfile-stripnondeterminism-perl (1.14.1-2) ... 125s Selecting previously unselected package dh-strip-nondeterminism. 125s Preparing to unpack .../35-dh-strip-nondeterminism_1.14.1-2_all.deb ... 125s Unpacking dh-strip-nondeterminism (1.14.1-2) ... 125s Selecting previously unselected package debugedit. 125s Preparing to unpack .../36-debugedit_1%3a5.1-2_arm64.deb ... 125s Unpacking debugedit (1:5.1-2) ... 125s Selecting previously unselected package dwz. 125s Preparing to unpack .../37-dwz_0.15-1build6_arm64.deb ... 125s Unpacking dwz (0.15-1build6) ... 125s Selecting previously unselected package gettext. 125s Preparing to unpack .../38-gettext_0.23.1-1_arm64.deb ... 125s Unpacking gettext (0.23.1-1) ... 126s Selecting previously unselected package intltool-debian. 126s Preparing to unpack .../39-intltool-debian_0.35.0+20060710.6_all.deb ... 126s Unpacking intltool-debian (0.35.0+20060710.6) ... 126s Selecting previously unselected package po-debconf. 126s Preparing to unpack .../40-po-debconf_1.0.21+nmu1_all.deb ... 126s Unpacking po-debconf (1.0.21+nmu1) ... 126s Selecting previously unselected package debhelper. 126s Preparing to unpack .../41-debhelper_13.24.1ubuntu2_all.deb ... 126s Unpacking debhelper (13.24.1ubuntu2) ... 126s Selecting previously unselected package dh-python. 126s Preparing to unpack .../42-dh-python_6.20250308_all.deb ... 126s Unpacking dh-python (6.20250308) ... 126s Selecting previously unselected package libjs-jquery. 126s Preparing to unpack .../43-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 126s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 126s Selecting previously unselected package libjs-jquery-metadata. 126s Preparing to unpack .../44-libjs-jquery-metadata_12-4_all.deb ... 126s Unpacking libjs-jquery-metadata (12-4) ... 126s Selecting previously unselected package libjs-jquery-tablesorter. 126s Preparing to unpack .../45-libjs-jquery-tablesorter_1%3a2.31.3+dfsg1-4_all.deb ... 126s Unpacking libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 126s Selecting previously unselected package libjs-jquery-throttle-debounce. 126s Preparing to unpack .../46-libjs-jquery-throttle-debounce_1.1+dfsg.1-2_all.deb ... 126s Unpacking libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 126s Selecting previously unselected package pybuild-plugin-autopkgtest. 126s Preparing to unpack .../47-pybuild-plugin-autopkgtest_6.20250308_all.deb ... 126s Unpacking pybuild-plugin-autopkgtest (6.20250308) ... 126s Selecting previously unselected package python3-importlib-metadata. 126s Preparing to unpack .../48-python3-importlib-metadata_8.6.1-1_all.deb ... 126s Unpacking python3-importlib-metadata (8.6.1-1) ... 126s Selecting previously unselected package python3-packaging. 126s Preparing to unpack .../49-python3-packaging_24.2-1_all.deb ... 126s Unpacking python3-packaging (24.2-1) ... 126s Selecting previously unselected package python3-pyproject-hooks. 126s Preparing to unpack .../50-python3-pyproject-hooks_1.2.0-1_all.deb ... 126s Unpacking python3-pyproject-hooks (1.2.0-1) ... 126s Selecting previously unselected package python3-toml. 126s Preparing to unpack .../51-python3-toml_0.10.2-1_all.deb ... 126s Unpacking python3-toml (0.10.2-1) ... 126s Selecting previously unselected package python3-wheel. 126s Preparing to unpack .../52-python3-wheel_0.45.1-1_all.deb ... 126s Unpacking python3-wheel (0.45.1-1) ... 126s Selecting previously unselected package python3-build. 126s Preparing to unpack .../53-python3-build_1.2.2-1_all.deb ... 126s Unpacking python3-build (1.2.2-1) ... 126s Selecting previously unselected package python3-installer. 126s Preparing to unpack .../54-python3-installer_0.7.0+dfsg1-3_all.deb ... 126s Unpacking python3-installer (0.7.0+dfsg1-3) ... 126s Selecting previously unselected package pybuild-plugin-pyproject. 126s Preparing to unpack .../55-pybuild-plugin-pyproject_6.20250308_all.deb ... 126s Unpacking pybuild-plugin-pyproject (6.20250308) ... 126s Selecting previously unselected package python3-all. 126s Preparing to unpack .../56-python3-all_3.13.2-2_arm64.deb ... 126s Unpacking python3-all (3.13.2-2) ... 126s Selecting previously unselected package python3-msgpack. 126s Preparing to unpack .../57-python3-msgpack_1.0.3-3build4_arm64.deb ... 126s Unpacking python3-msgpack (1.0.3-3build4) ... 126s Selecting previously unselected package python3-cachecontrol. 126s Preparing to unpack .../58-python3-cachecontrol_0.14.2-1_all.deb ... 126s Unpacking python3-cachecontrol (0.14.2-1) ... 126s Selecting previously unselected package python3-rapidfuzz. 126s Preparing to unpack .../59-python3-rapidfuzz_3.12.1+ds-1build1_arm64.deb ... 126s Unpacking python3-rapidfuzz (3.12.1+ds-1build1) ... 127s Selecting previously unselected package python3-cleo. 127s Preparing to unpack .../60-python3-cleo_2.2.1-4_all.deb ... 127s Unpacking python3-cleo (2.2.1-4) ... 127s Selecting previously unselected package python3-coverage. 127s Preparing to unpack .../61-python3-coverage_7.6.0+dfsg1-2build1_arm64.deb ... 127s Unpacking python3-coverage (7.6.0+dfsg1-2build1) ... 127s Selecting previously unselected package python3-distlib. 127s Preparing to unpack .../62-python3-distlib_0.3.9-1_all.deb ... 127s Unpacking python3-distlib (0.3.9-1) ... 127s Selecting previously unselected package python3-dulwich. 127s Preparing to unpack .../63-python3-dulwich_0.22.7-1_arm64.deb ... 127s Unpacking python3-dulwich (0.22.7-1) ... 127s Selecting previously unselected package python3-execnet. 127s Preparing to unpack .../64-python3-execnet_2.1.1-1_all.deb ... 127s Unpacking python3-execnet (2.1.1-1) ... 127s Selecting previously unselected package python3-fastjsonschema. 127s Preparing to unpack .../65-python3-fastjsonschema_2.21.1-1_all.deb ... 127s Unpacking python3-fastjsonschema (2.21.1-1) ... 127s Selecting previously unselected package python3-filelock. 127s Preparing to unpack .../66-python3-filelock_3.17.0-1_all.deb ... 127s Unpacking python3-filelock (3.17.0-1) ... 127s Selecting previously unselected package python3-findpython. 127s Preparing to unpack .../67-python3-findpython_0.6.2-1_all.deb ... 127s Unpacking python3-findpython (0.6.2-1) ... 127s Selecting previously unselected package python3-iniconfig. 127s Preparing to unpack .../68-python3-iniconfig_1.1.1-2_all.deb ... 127s Unpacking python3-iniconfig (1.1.1-2) ... 127s Selecting previously unselected package python3-jaraco.classes. 127s Preparing to unpack .../69-python3-jaraco.classes_3.4.0-1_all.deb ... 127s Unpacking python3-jaraco.classes (3.4.0-1) ... 127s Selecting previously unselected package python3-jeepney. 127s Preparing to unpack .../70-python3-jeepney_0.8.0-4_all.deb ... 127s Unpacking python3-jeepney (0.8.0-4) ... 127s Selecting previously unselected package python3-secretstorage. 127s Preparing to unpack .../71-python3-secretstorage_3.3.3-3_all.deb ... 127s Unpacking python3-secretstorage (3.3.3-3) ... 127s Selecting previously unselected package python3-keyring. 127s Preparing to unpack .../72-python3-keyring_25.6.0-1_all.deb ... 127s Unpacking python3-keyring (25.6.0-1) ... 127s Selecting previously unselected package python3-pbs-installer. 127s Preparing to unpack .../73-python3-pbs-installer_2025.02.12-2_all.deb ... 127s Unpacking python3-pbs-installer (2025.02.12-2) ... 127s Selecting previously unselected package python3-pip-whl. 127s Preparing to unpack .../74-python3-pip-whl_25.0+dfsg-1_all.deb ... 127s Unpacking python3-pip-whl (25.0+dfsg-1) ... 127s Selecting previously unselected package python3-pkginfo. 127s Preparing to unpack .../75-python3-pkginfo_1.12.1.2-2_all.deb ... 127s Unpacking python3-pkginfo (1.12.1.2-2) ... 127s Selecting previously unselected package python3-platformdirs. 127s Preparing to unpack .../76-python3-platformdirs_4.3.6-1_all.deb ... 127s Unpacking python3-platformdirs (4.3.6-1) ... 127s Selecting previously unselected package python3-pluggy. 127s Preparing to unpack .../77-python3-pluggy_1.5.0-1_all.deb ... 127s Unpacking python3-pluggy (1.5.0-1) ... 127s Selecting previously unselected package python3-poetry-core. 127s Preparing to unpack .../78-python3-poetry-core_2.1.1-1_all.deb ... 127s Unpacking python3-poetry-core (2.1.1-1) ... 127s Selecting previously unselected package python3-requests-toolbelt. 127s Preparing to unpack .../79-python3-requests-toolbelt_1.0.0-4_all.deb ... 127s Unpacking python3-requests-toolbelt (1.0.0-4) ... 127s Selecting previously unselected package python3-shellingham. 127s Preparing to unpack .../80-python3-shellingham_1.5.4-1_all.deb ... 127s Unpacking python3-shellingham (1.5.4-1) ... 128s Selecting previously unselected package python3-tomlkit. 128s Preparing to unpack .../81-python3-tomlkit_0.13.2-1_all.deb ... 128s Unpacking python3-tomlkit (0.13.2-1) ... 128s Selecting previously unselected package python3-trove-classifiers. 128s Preparing to unpack .../82-python3-trove-classifiers_2025.1.15.22-1_all.deb ... 128s Unpacking python3-trove-classifiers (2025.1.15.22-1) ... 128s Selecting previously unselected package python3-setuptools-whl. 128s Preparing to unpack .../83-python3-setuptools-whl_75.8.0-1_all.deb ... 128s Unpacking python3-setuptools-whl (75.8.0-1) ... 128s Selecting previously unselected package python3-wheel-whl. 128s Preparing to unpack .../84-python3-wheel-whl_0.45.1-1_all.deb ... 128s Unpacking python3-wheel-whl (0.45.1-1) ... 128s Selecting previously unselected package python3-virtualenv. 128s Preparing to unpack .../85-python3-virtualenv_20.29.1+ds-1_all.deb ... 128s Unpacking python3-virtualenv (20.29.1+ds-1) ... 128s Selecting previously unselected package python3-poetry. 128s Preparing to unpack .../86-python3-poetry_2.1.1+dfsg-1_all.deb ... 128s Unpacking python3-poetry (2.1.1+dfsg-1) ... 128s Selecting previously unselected package python3-poetry-plugin-export. 128s Preparing to unpack .../87-python3-poetry-plugin-export_1.9.0-1_all.deb ... 128s Unpacking python3-poetry-plugin-export (1.9.0-1) ... 128s Selecting previously unselected package python3-pytest. 128s Preparing to unpack .../88-python3-pytest_8.3.4-1_all.deb ... 128s Unpacking python3-pytest (8.3.4-1) ... 128s Selecting previously unselected package libjs-jquery-hotkeys. 128s Preparing to unpack .../89-libjs-jquery-hotkeys_0.2.0-1_all.deb ... 128s Unpacking libjs-jquery-hotkeys (0.2.0-1) ... 128s Selecting previously unselected package libjs-jquery-isonscreen. 128s Preparing to unpack .../90-libjs-jquery-isonscreen_1.2.0-1.1_all.deb ... 128s Unpacking libjs-jquery-isonscreen (1.2.0-1.1) ... 128s Selecting previously unselected package python3-pytest-cov. 128s Preparing to unpack .../91-python3-pytest-cov_5.0.0-1_all.deb ... 128s Unpacking python3-pytest-cov (5.0.0-1) ... 128s Selecting previously unselected package python3-pytest-mock. 128s Preparing to unpack .../92-python3-pytest-mock_3.14.0-2_all.deb ... 128s Unpacking python3-pytest-mock (3.14.0-2) ... 128s Selecting previously unselected package python3-pytest-xdist. 128s Preparing to unpack .../93-python3-pytest-xdist_3.6.1-1_all.deb ... 128s Unpacking python3-pytest-xdist (3.6.1-1) ... 128s Setting up dh-python (6.20250308) ... 128s Setting up python3-iniconfig (1.1.1-2) ... 128s Setting up python3-rapidfuzz (3.12.1+ds-1build1) ... 129s Setting up python3-setuptools-whl (75.8.0-1) ... 129s Setting up python3-filelock (3.17.0-1) ... 129s Setting up python3-jaraco.classes (3.4.0-1) ... 129s Setting up python3-requests-toolbelt (1.0.0-4) ... 129s Setting up python3-importlib-metadata (8.6.1-1) ... 129s Setting up python3-pkginfo (1.12.1.2-2) ... 129s Setting up python3-pip-whl (25.0+dfsg-1) ... 129s Setting up libarchive-zip-perl (1.68-1) ... 129s Setting up libdebhelper-perl (13.24.1ubuntu2) ... 129s Setting up m4 (1.4.19-7) ... 129s Setting up python3-all (3.13.2-2) ... 129s Setting up python3-coverage (7.6.0+dfsg1-2build1) ... 129s Setting up libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 129s Setting up python3-distlib (0.3.9-1) ... 130s Setting up libgomp1:arm64 (15-20250222-0ubuntu1) ... 130s Setting up python3-wheel (0.45.1-1) ... 130s Setting up python3-platformdirs (4.3.6-1) ... 130s Setting up autotools-dev (20220109.1) ... 130s Setting up python3-packaging (24.2-1) ... 130s Setting up python3-pyproject-hooks (1.2.0-1) ... 130s Setting up python3-poetry-core (2.1.1-1) ... 130s Setting up libmpc3:arm64 (1.3.1-1build2) ... 130s Setting up autopoint (0.23.1-1) ... 130s Setting up python3-toml (0.10.2-1) ... 130s Setting up python3-jeepney (0.8.0-4) ... 131s Setting up python3-installer (0.7.0+dfsg1-3) ... 131s Setting up autoconf (2.72-3ubuntu1) ... 131s Setting up python3-pluggy (1.5.0-1) ... 131s Setting up libubsan1:arm64 (15-20250222-0ubuntu1) ... 131s Setting up python3-fastjsonschema (2.21.1-1) ... 131s Setting up dwz (0.15-1build6) ... 131s Setting up python3-trove-classifiers (2025.1.15.22-1) ... 131s Setting up libhwasan0:arm64 (15-20250222-0ubuntu1) ... 131s Setting up python3-pbs-installer (2025.02.12-2) ... 131s Setting up python3-dulwich (0.22.7-1) ... 132s Setting up libasan8:arm64 (15-20250222-0ubuntu1) ... 132s Setting up debugedit (1:5.1-2) ... 132s Setting up python3-cleo (2.2.1-4) ... 132s Setting up python3-msgpack (1.0.3-3build4) ... 132s Setting up python3-cachecontrol (0.14.2-1) ... 132s Setting up libtsan2:arm64 (15-20250222-0ubuntu1) ... 132s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 132s Setting up libjs-jquery-hotkeys (0.2.0-1) ... 132s Setting up libisl23:arm64 (0.27-1) ... 132s Setting up python3-build (1.2.2-1) ... 132s Setting up python3-execnet (2.1.1-1) ... 132s Setting up python3-shellingham (1.5.4-1) ... 132s Setting up python3-tomlkit (0.13.2-1) ... 133s Setting up python3-wheel-whl (0.45.1-1) ... 133s Setting up libcc1-0:arm64 (15-20250222-0ubuntu1) ... 133s Setting up liblsan0:arm64 (15-20250222-0ubuntu1) ... 133s Setting up libitm1:arm64 (15-20250222-0ubuntu1) ... 133s Setting up automake (1:1.17-3ubuntu1) ... 133s update-alternatives: using /usr/bin/automake-1.17 to provide /usr/bin/automake (automake) in auto mode 133s Setting up libfile-stripnondeterminism-perl (1.14.1-2) ... 133s Setting up gettext (0.23.1-1) ... 133s Setting up python3-findpython (0.6.2-1) ... 133s Setting up pybuild-plugin-pyproject (6.20250308) ... 133s Setting up python3-pytest (8.3.4-1) ... 133s Setting up python3-virtualenv (20.29.1+ds-1) ... 133s Setting up intltool-debian (0.35.0+20060710.6) ... 133s Setting up python3-secretstorage (3.3.3-3) ... 133s Setting up libjs-jquery-metadata (12-4) ... 133s Setting up libjs-jquery-isonscreen (1.2.0-1.1) ... 133s Setting up dh-strip-nondeterminism (1.14.1-2) ... 133s Setting up libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 133s Setting up python3-pytest-mock (3.14.0-2) ... 133s Setting up cpp-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 133s Setting up python3-keyring (25.6.0-1) ... 134s Setting up libgcc-14-dev:arm64 (14.2.0-17ubuntu3) ... 134s Setting up libstdc++-14-dev:arm64 (14.2.0-17ubuntu3) ... 134s Setting up python3-pytest-xdist (3.6.1-1) ... 134s Setting up po-debconf (1.0.21+nmu1) ... 134s Setting up python3-pytest-cov (5.0.0-1) ... 134s Setting up cpp-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 134s Setting up python3-poetry (2.1.1+dfsg-1) ... 134s Setting up cpp-14 (14.2.0-17ubuntu3) ... 134s Setting up cpp (4:14.2.0-1ubuntu1) ... 134s Setting up gcc-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 134s Setting up gcc-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 134s Setting up python3-poetry-plugin-export (1.9.0-1) ... 134s Setting up g++-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 134s Setting up gcc-14 (14.2.0-17ubuntu3) ... 134s Setting up g++-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 134s Setting up g++-14 (14.2.0-17ubuntu3) ... 134s Setting up libtool (2.5.4-4) ... 134s Setting up gcc (4:14.2.0-1ubuntu1) ... 134s Setting up dh-autoreconf (20) ... 134s Setting up g++ (4:14.2.0-1ubuntu1) ... 134s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 134s Setting up build-essential (12.10ubuntu1) ... 134s Setting up debhelper (13.24.1ubuntu2) ... 134s Setting up pybuild-plugin-autopkgtest (6.20250308) ... 134s Processing triggers for install-info (7.1.1-1) ... 135s Processing triggers for libc-bin (2.41-1ubuntu1) ... 135s Processing triggers for man-db (2.13.0-1) ... 137s autopkgtest [09:21:12]: test pybuild-autopkgtest: pybuild-autopkgtest 137s autopkgtest [09:21:12]: test pybuild-autopkgtest: [----------------------- 137s pybuild-autopkgtest 138s I: pybuild base:311: cd /tmp/autopkgtest.UGvsHB/autopkgtest_tmp/build; python3.13 -m pytest tests 139s ============================= test session starts ============================== 139s platform linux -- Python 3.13.2, pytest-8.3.4, pluggy-1.5.0 139s rootdir: /tmp/autopkgtest.UGvsHB/autopkgtest_tmp/build 139s configfile: pyproject.toml 139s plugins: mock-3.14.0, xdist-3.6.1, typeguard-4.4.2, cov-5.0.0 139s created: 2/2 workers 139s 2 workers [141 items] 139s 145s FFF.FF...FF.F.F.FF.F.FF.F.FFFFFFFFFFF..FFFFFFFFFFFFFF.F.FFFFFFFFFFFFF... [ 51%] 149s .FFFF..FFFFFFFFFFFFFFFFFFFFF..F.F.F..F..F.FF..F..F..FFFFFFFFFFFFFF..F [100%] 149s =================================== FAILURES =================================== 149s _ test_export_includes_extras_by_flag[feature_bar-bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s do_lock = None, extras = 'feature_bar' 149s expected = 'bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 149s 149s @pytest.mark.parametrize( 149s "extras, expected", 149s [ 149s ( 149s "feature_bar", 149s f"""\ 149s bar==1.1.0 ; {MARKER_PY} 149s foo==1.0.0 ; {MARKER_PY} 149s """, 149s ), 149s ( 149s "feature_bar feature_qux", 149s f"""\ 149s bar==1.1.0 ; {MARKER_PY} 149s foo==1.0.0 ; {MARKER_PY} 149s qux==1.2.0 ; {MARKER_PY} 149s """, 149s ), 149s ], 149s ) 149s def test_export_includes_extras_by_flag( 149s tester: CommandTester, do_lock: None, extras: str, expected: str 149s ) -> None: 149s tester.execute(f"--format requirements.txt --extras '{extras}'") 149s > assert tester.io.fetch_output() == expected 149s E assert 'bar==1.1.0 ;...ion < "4.0"\n' == 'bar==1.1.0 ;...on == "2.7"\n' 149s E 149s E - bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==1.1.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (2 lines hidden), use '-vv' to show 149s 149s tests/command/test_command_export.py:226: AssertionError 149s _ test_export_includes_extras_by_flag[feature_bar feature_qux-bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nqux==1.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s do_lock = None, extras = 'feature_bar feature_qux' 149s expected = 'bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_versi... python_version == "2.7"\nqux==1.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 149s 149s @pytest.mark.parametrize( 149s "extras, expected", 149s [ 149s ( 149s "feature_bar", 149s f"""\ 149s bar==1.1.0 ; {MARKER_PY} 149s foo==1.0.0 ; {MARKER_PY} 149s """, 149s ), 149s ( 149s "feature_bar feature_qux", 149s f"""\ 149s bar==1.1.0 ; {MARKER_PY} 149s foo==1.0.0 ; {MARKER_PY} 149s qux==1.2.0 ; {MARKER_PY} 149s """, 149s ), 149s ], 149s ) 149s def test_export_includes_extras_by_flag( 149s tester: CommandTester, do_lock: None, extras: str, expected: str 149s ) -> None: 149s tester.execute(f"--format requirements.txt --extras '{extras}'") 149s > assert tester.io.fetch_output() == expected 149s E assert 'bar==1.1.0 ;...ion < "4.0"\n' == 'bar==1.1.0 ;...on == "2.7"\n' 149s E 149s E - bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==1.1.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (6 lines hidden), use '-vv' to show 149s 149s tests/command/test_command_export.py:226: AssertionError 149s _______ test_export_exports_requirements_txt_file_locks_if_no_lock_file ________ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s poetry = 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_export_exports_requiremen0') 149s 149s def test_export_exports_requirements_txt_file_locks_if_no_lock_file( 149s tester: CommandTester, poetry: Poetry, tmp_path: Path 149s ) -> None: 149s assert not poetry.locker.lock.exists() 149s > _export_requirements(tester, poetry, tmp_path) 149s 149s tests/command/test_command_export.py:122: 149s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 149s 149s tester = 149s poetry = 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_export_exports_requiremen0') 149s 149s def _export_requirements(tester: CommandTester, poetry: Poetry, tmp_path: Path) -> None: 149s from tests.helpers import as_cwd 149s 149s with as_cwd(tmp_path): 149s tester.execute("--format requirements.txt --output requirements.txt") 149s 149s requirements = tmp_path / "requirements.txt" 149s assert requirements.exists() 149s 149s with requirements.open(encoding="utf-8") as f: 149s content = f.read() 149s 149s assert poetry.locker.lock.exists() 149s 149s expected = f"""\ 149s foo==1.0.0 ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 149s E 149s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/command/test_command_export.py:115: AssertionError 149s _____________ test_export_exports_requirements_txt_uses_lock_file ______________ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s poetry = 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_export_exports_requiremen1') 149s do_lock = None 149s 149s def test_export_exports_requirements_txt_uses_lock_file( 149s tester: CommandTester, poetry: Poetry, tmp_path: Path, do_lock: None 149s ) -> None: 149s > _export_requirements(tester, poetry, tmp_path) 149s 149s tests/command/test_command_export.py:129: 149s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 149s 149s tester = 149s poetry = 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_export_exports_requiremen1') 149s 149s def _export_requirements(tester: CommandTester, poetry: Poetry, tmp_path: Path) -> None: 149s from tests.helpers import as_cwd 149s 149s with as_cwd(tmp_path): 149s tester.execute("--format requirements.txt --output requirements.txt") 149s 149s requirements = tmp_path / "requirements.txt" 149s assert requirements.exists() 149s 149s with requirements.open(encoding="utf-8") as f: 149s content = f.read() 149s 149s assert poetry.locker.lock.exists() 149s 149s expected = f"""\ 149s foo==1.0.0 ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 149s E 149s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/command/test_command_export.py:115: AssertionError 149s _________________________ test_export_with_all_extras __________________________ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s do_lock = None 149s 149s def test_export_with_all_extras(tester: CommandTester, do_lock: None) -> None: 149s tester.execute("--format requirements.txt --all-extras") 149s output = tester.io.fetch_output() 149s > assert f"bar==1.1.0 ; {MARKER_PY}" in output 149s E assert 'bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"' in 'bar==1.1.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0"\nfoo==1.0.0 ; python_versi...d python_version < "4.0"\nqux==1.2.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0"\n' 149s 149s tests/command/test_command_export.py:239: AssertionError 149s _________________________ test_export_with_all_groups __________________________ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s do_lock = None 149s 149s def test_export_with_all_groups(tester: CommandTester, do_lock: None) -> None: 149s tester.execute("--format requirements.txt --all-groups") 149s output = tester.io.fetch_output() 149s > assert f"baz==2.0.0 ; {MARKER_PY}" in output 149s E assert 'baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"' in 'baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0"\nfoo==1.0.0 ; python_versi...d python_version < "4.0"\nopt==2.2.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0"\n' 149s 149s tests/command/test_command_export.py:256: AssertionError 149s ___________________ test_export_prints_to_stdout_by_default ____________________ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s do_lock = None 149s 149s def test_export_prints_to_stdout_by_default( 149s tester: CommandTester, do_lock: None 149s ) -> None: 149s tester.execute("--format requirements.txt") 149s expected = f"""\ 149s foo==1.0.0 ; {MARKER_PY} 149s """ 149s > assert tester.io.fetch_output() == expected 149s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 149s E 149s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/command/test_command_export.py:157: AssertionError 149s _____________ test_export_uses_requirements_txt_format_by_default ______________ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s do_lock = None 149s 149s def test_export_uses_requirements_txt_format_by_default( 149s tester: CommandTester, do_lock: None 149s ) -> None: 149s tester.execute() 149s expected = f"""\ 149s foo==1.0.0 ; {MARKER_PY} 149s """ 149s > assert tester.io.fetch_output() == expected 149s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 149s E 149s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/command/test_command_export.py:167: AssertionError 149s _ test_export_groups[-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s do_lock = None, options = '' 149s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 149s 149s @pytest.mark.parametrize( 149s "options, expected", 149s [ 149s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 149s ( 149s "--with dev,opt", 149s ( 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 149s f" {MARKER_PY}\n" 149s ), 149s ), 149s (f"--without {MAIN_GROUP}", "\n"), 149s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s (f"--without {MAIN_GROUP},dev,opt", "\n"), 149s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 149s ( 149s f"--only {MAIN_GROUP},dev", 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 149s ), 149s ], 149s ) 149s def test_export_groups( 149s tester: CommandTester, do_lock: None, options: str, expected: str 149s ) -> None: 149s tester.execute(options) 149s > assert tester.io.fetch_output() == expected 149s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 149s E 149s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/command/test_command_export.py:199: AssertionError 149s _ test_export_groups[--with dev-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s do_lock = None, options = '--with dev' 149s expected = 'baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 149s 149s @pytest.mark.parametrize( 149s "options, expected", 149s [ 149s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 149s ( 149s "--with dev,opt", 149s ( 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 149s f" {MARKER_PY}\n" 149s ), 149s ), 149s (f"--without {MAIN_GROUP}", "\n"), 149s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s (f"--without {MAIN_GROUP},dev,opt", "\n"), 149s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 149s ( 149s f"--only {MAIN_GROUP},dev", 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 149s ), 149s ], 149s ) 149s def test_export_groups( 149s tester: CommandTester, do_lock: None, options: str, expected: str 149s ) -> None: 149s tester.execute(options) 149s > assert tester.io.fetch_output() == expected 149s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 149s E 149s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (2 lines hidden), use '-vv' to show 149s 149s tests/command/test_command_export.py:199: AssertionError 149s _ test_export_groups[--with opt-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nopt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s do_lock = None, options = '--with opt' 149s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nopt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 149s 149s @pytest.mark.parametrize( 149s "options, expected", 149s [ 149s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 149s ( 149s "--with dev,opt", 149s ( 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 149s f" {MARKER_PY}\n" 149s ), 149s ), 149s (f"--without {MAIN_GROUP}", "\n"), 149s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s (f"--without {MAIN_GROUP},dev,opt", "\n"), 149s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 149s ( 149s f"--only {MAIN_GROUP},dev", 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 149s ), 149s ], 149s ) 149s def test_export_groups( 149s tester: CommandTester, do_lock: None, options: str, expected: str 149s ) -> None: 149s tester.execute(options) 149s > assert tester.io.fetch_output() == expected 149s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 149s E 149s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - opt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (2 lines hidden), use '-vv' to show 149s 149s tests/command/test_command_export.py:199: AssertionError 149s _ test_export_groups[--with dev,opt-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nopt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s do_lock = None, options = '--with dev,opt' 149s expected = 'baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_versi... python_version == "2.7"\nopt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 149s 149s @pytest.mark.parametrize( 149s "options, expected", 149s [ 149s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 149s ( 149s "--with dev,opt", 149s ( 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 149s f" {MARKER_PY}\n" 149s ), 149s ), 149s (f"--without {MAIN_GROUP}", "\n"), 149s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s (f"--without {MAIN_GROUP},dev,opt", "\n"), 149s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 149s ( 149s f"--only {MAIN_GROUP},dev", 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 149s ), 149s ], 149s ) 149s def test_export_groups( 149s tester: CommandTester, do_lock: None, options: str, expected: str 149s ) -> None: 149s tester.execute(options) 149s > assert tester.io.fetch_output() == expected 149s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 149s E 149s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (6 lines hidden), use '-vv' to show 149s 149s tests/command/test_command_export.py:199: AssertionError 149s _ test_export_groups[--without dev-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s do_lock = None, options = '--without dev' 149s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 149s 149s @pytest.mark.parametrize( 149s "options, expected", 149s [ 149s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 149s ( 149s "--with dev,opt", 149s ( 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 149s f" {MARKER_PY}\n" 149s ), 149s ), 149s (f"--without {MAIN_GROUP}", "\n"), 149s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s (f"--without {MAIN_GROUP},dev,opt", "\n"), 149s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 149s ( 149s f"--only {MAIN_GROUP},dev", 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 149s ), 149s ], 149s ) 149s def test_export_groups( 149s tester: CommandTester, do_lock: None, options: str, expected: str 149s ) -> None: 149s tester.execute(options) 149s > assert tester.io.fetch_output() == expected 149s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 149s E 149s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/command/test_command_export.py:199: AssertionError 149s _ test_export_groups[--without opt-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s do_lock = None, options = '--without opt' 149s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 149s 149s @pytest.mark.parametrize( 149s "options, expected", 149s [ 149s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 149s ( 149s "--with dev,opt", 149s ( 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 149s f" {MARKER_PY}\n" 149s ), 149s ), 149s (f"--without {MAIN_GROUP}", "\n"), 149s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s (f"--without {MAIN_GROUP},dev,opt", "\n"), 149s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 149s ( 149s f"--only {MAIN_GROUP},dev", 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 149s ), 149s ], 149s ) 149s def test_export_groups( 149s tester: CommandTester, do_lock: None, options: str, expected: str 149s ) -> None: 149s tester.execute(options) 149s > assert tester.io.fetch_output() == expected 149s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 149s E 149s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/command/test_command_export.py:199: AssertionError 149s ____ test_exporter_can_export_requirements_txt_with_standard_packages[1.1] _____ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi0') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_standard_packages( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": [], "bar": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} 149s foo==1.2.3 ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 149s E 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (2 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:159: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s ____ test_exporter_can_export_requirements_txt_with_standard_packages[2.1] _____ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi1') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_standard_packages( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": [], "bar": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} 149s foo==1.2.3 ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 149s E 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (2 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:159: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[1.1] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi2') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_standard_packages_and_markers( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "baz", 149s "version": "7.8.9", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": [], "bar": [], "baz": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][0]["markers"] = "python_version < '3.7'" 149s lock_data["package"][2]["markers"] = "sys_platform == 'win32'" 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s markers = { 149s "foo": "python_version < '3.7'", 149s "bar": "extra =='foo'", 149s "baz": "sys_platform == 'win32'", 149s } 149s set_package_requires(poetry, markers=markers) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} 149s baz==7.8.9 ; {MARKER_PY_WIN32} 149s foo==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_ONLY)} 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...on == "3.6"\n' == 'bar==4.5.6 ;...on == "3.6"\n' 149s E 149s E Skipping 57 identical trailing characters in diff, use -v to show 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - baz==7.8.9 ; (python_version >= "3.6" or python_version == "2.7") and sys_platform == "win32" and python_version < "4.0"... 149s E 149s E ...Full output truncated (2 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:218: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_export_groups[--only main-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s do_lock = None, options = '--only main' 149s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 149s 149s @pytest.mark.parametrize( 149s "options, expected", 149s [ 149s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 149s ( 149s "--with dev,opt", 149s ( 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 149s f" {MARKER_PY}\n" 149s ), 149s ), 149s (f"--without {MAIN_GROUP}", "\n"), 149s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s (f"--without {MAIN_GROUP},dev,opt", "\n"), 149s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 149s ( 149s f"--only {MAIN_GROUP},dev", 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 149s ), 149s ], 149s ) 149s def test_export_groups( 149s tester: CommandTester, do_lock: None, options: str, expected: str 149s ) -> None: 149s tester.execute(options) 149s > assert tester.io.fetch_output() == expected 149s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 149s E 149s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/command/test_command_export.py:199: AssertionError 149s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[2.1] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi3') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_standard_packages_and_markers( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "baz", 149s "version": "7.8.9", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": [], "bar": [], "baz": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][0]["markers"] = "python_version < '3.7'" 149s lock_data["package"][2]["markers"] = "sys_platform == 'win32'" 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s markers = { 149s "foo": "python_version < '3.7'", 149s "bar": "extra =='foo'", 149s "baz": "sys_platform == 'win32'", 149s } 149s set_package_requires(poetry, markers=markers) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} 149s baz==7.8.9 ; {MARKER_PY_WIN32} 149s foo==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_ONLY)} 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...on == "3.6"\n' == 'bar==4.5.6 ;...on == "3.6"\n' 149s E 149s E Skipping 57 identical trailing characters in diff, use -v to show 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - baz==7.8.9 ; (python_version >= "3.6" or python_version == "2.7") and sys_platform == "win32" and python_version < "4.0"... 149s E 149s E ...Full output truncated (2 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:218: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s ____________ test_exporter_can_export_requirements_txt_poetry[1.1] _____________ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi4') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_poetry( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s """Regression test for #3254""" 149s 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "poetry", 149s "version": "1.1.4", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"keyring": "*"}, 149s }, 149s { 149s "name": "junit-xml", 149s "version": "1.9", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"six": "*"}, 149s }, 149s { 149s "name": "keyring", 149s "version": "21.8.0", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": { 149s "SecretStorage": { 149s "version": "*", 149s "markers": "sys_platform == 'linux'", 149s } 149s }, 149s }, 149s { 149s "name": "secretstorage", 149s "version": "3.3.0", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"cryptography": "*"}, 149s }, 149s { 149s "name": "cryptography", 149s "version": "3.2", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"six": "*"}, 149s }, 149s { 149s "name": "six", 149s "version": "1.15.0", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "poetry": [], 149s "keyring": [], 149s "secretstorage": [], 149s "cryptography": [], 149s "six": [], 149s "junit-xml": [], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][3]["markers"] = "sys_platform == 'linux'" 149s lock_data["package"][4]["markers"] = "sys_platform == 'linux'" 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires( 149s poetry, skip={"keyring", "secretstorage", "cryptography", "six"} 149s ) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s # The dependency graph: 149s # junit-xml 1.9 Creates JUnit XML test result documents that can be read by tools 149s # └── six * such as Jenkins 149s # poetry 1.1.4 Python dependency management and packaging made easy. 149s # ├── keyring >=21.2.0,<22.0.0 149s # │ ├── importlib-metadata >=1 149s # │ │ └── zipp >=0.5 149s # │ ├── jeepney >=0.4.2 149s # │ ├── pywin32-ctypes <0.1.0 || >0.1.0,<0.1.1 || >0.1.1 149s # │ └── secretstorage >=3.2 -- On linux only 149s # │ ├── cryptography >=2.0 149s # │ │ └── six >=1.4.1 149s # │ └── jeepney >=0.6 (circular dependency aborted here) 149s expected = { 149s "poetry": Dependency.create_from_pep_508(f"poetry==1.1.4; {MARKER_PY}"), 149s "junit-xml": Dependency.create_from_pep_508(f"junit-xml==1.9 ; {MARKER_PY}"), 149s "keyring": Dependency.create_from_pep_508(f"keyring==21.8.0 ; {MARKER_PY}"), 149s "secretstorage": Dependency.create_from_pep_508( 149s f"secretstorage==3.3.0 ; {MARKER_PY_LINUX}" 149s ), 149s "cryptography": Dependency.create_from_pep_508( 149s f"cryptography==3.2 ; {MARKER_PY_LINUX}" 149s ), 149s "six": Dependency.create_from_pep_508( 149s f"six==1.15.0 ; {MARKER_PY.union(MARKER_PY_LINUX)}" 149s ), 149s } 149s 149s for line in content.strip().split("\n"): 149s dependency = Dependency.create_from_pep_508(line) 149s assert dependency.name in expected 149s expected_dependency = expected.pop(dependency.name) 149s assert dependency == expected_dependency 149s > assert dependency.marker == expected_dependency.marker 149s E assert = "3.6") and python_version < "4.0" and sys_platform == "linux"> == = "3.6" or python_version == "2.7") and sys_platform == "linux" and python_version < "4.0"> 149s E + where = "3.6") and python_version < "4.0" and sys_platform == "linux"> = .marker 149s E + and = "3.6" or python_version == "2.7") and sys_platform == "linux" and python_version < "4.0"> = .marker 149s 149s tests/test_exporter.py:338: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_export_groups[--only dev-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s do_lock = None, options = '--only dev' 149s expected = 'baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 149s 149s @pytest.mark.parametrize( 149s "options, expected", 149s [ 149s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 149s ( 149s "--with dev,opt", 149s ( 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 149s f" {MARKER_PY}\n" 149s ), 149s ), 149s (f"--without {MAIN_GROUP}", "\n"), 149s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s (f"--without {MAIN_GROUP},dev,opt", "\n"), 149s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 149s ( 149s f"--only {MAIN_GROUP},dev", 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 149s ), 149s ], 149s ) 149s def test_export_groups( 149s tester: CommandTester, do_lock: None, options: str, expected: str 149s ) -> None: 149s tester.execute(options) 149s > assert tester.io.fetch_output() == expected 149s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 149s E 149s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/command/test_command_export.py:199: AssertionError 149s ____________ test_exporter_can_export_requirements_txt_poetry[2.1] _____________ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi5') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_poetry( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s """Regression test for #3254""" 149s 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "poetry", 149s "version": "1.1.4", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"keyring": "*"}, 149s }, 149s { 149s "name": "junit-xml", 149s "version": "1.9", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"six": "*"}, 149s }, 149s { 149s "name": "keyring", 149s "version": "21.8.0", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": { 149s "SecretStorage": { 149s "version": "*", 149s "markers": "sys_platform == 'linux'", 149s } 149s }, 149s }, 149s { 149s "name": "secretstorage", 149s "version": "3.3.0", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"cryptography": "*"}, 149s }, 149s { 149s "name": "cryptography", 149s "version": "3.2", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"six": "*"}, 149s }, 149s { 149s "name": "six", 149s "version": "1.15.0", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "poetry": [], 149s "keyring": [], 149s "secretstorage": [], 149s "cryptography": [], 149s "six": [], 149s "junit-xml": [], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][3]["markers"] = "sys_platform == 'linux'" 149s lock_data["package"][4]["markers"] = "sys_platform == 'linux'" 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires( 149s poetry, skip={"keyring", "secretstorage", "cryptography", "six"} 149s ) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s # The dependency graph: 149s # junit-xml 1.9 Creates JUnit XML test result documents that can be read by tools 149s # └── six * such as Jenkins 149s # poetry 1.1.4 Python dependency management and packaging made easy. 149s # ├── keyring >=21.2.0,<22.0.0 149s # │ ├── importlib-metadata >=1 149s # │ │ └── zipp >=0.5 149s # │ ├── jeepney >=0.4.2 149s # │ ├── pywin32-ctypes <0.1.0 || >0.1.0,<0.1.1 || >0.1.1 149s # │ └── secretstorage >=3.2 -- On linux only 149s # │ ├── cryptography >=2.0 149s # │ │ └── six >=1.4.1 149s # │ └── jeepney >=0.6 (circular dependency aborted here) 149s expected = { 149s "poetry": Dependency.create_from_pep_508(f"poetry==1.1.4; {MARKER_PY}"), 149s "junit-xml": Dependency.create_from_pep_508(f"junit-xml==1.9 ; {MARKER_PY}"), 149s "keyring": Dependency.create_from_pep_508(f"keyring==21.8.0 ; {MARKER_PY}"), 149s "secretstorage": Dependency.create_from_pep_508( 149s f"secretstorage==3.3.0 ; {MARKER_PY_LINUX}" 149s ), 149s "cryptography": Dependency.create_from_pep_508( 149s f"cryptography==3.2 ; {MARKER_PY_LINUX}" 149s ), 149s "six": Dependency.create_from_pep_508( 149s f"six==1.15.0 ; {MARKER_PY.union(MARKER_PY_LINUX)}" 149s ), 149s } 149s 149s for line in content.strip().split("\n"): 149s dependency = Dependency.create_from_pep_508(line) 149s assert dependency.name in expected 149s expected_dependency = expected.pop(dependency.name) 149s assert dependency == expected_dependency 149s > assert dependency.marker == expected_dependency.marker 149s E assert = "3.6") and python_version < "4.0" and sys_platform == "linux"> == = "3.6" or python_version == "2.7") and sys_platform == "linux" and python_version < "4.0"> 149s E + where = "3.6") and python_version < "4.0" and sys_platform == "linux"> = .marker 149s E + and = "3.6" or python_version == "2.7") and sys_platform == "linux" and python_version < "4.0"> = .marker 149s 149s tests/test_exporter.py:338: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s __________ test_exporter_can_export_requirements_txt_pyinstaller[1.1] __________ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi6') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_pyinstaller( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s """Regression test for #3254""" 149s 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "pyinstaller", 149s "version": "4.0", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": { 149s "altgraph": "*", 149s "macholib": { 149s "version": "*", 149s "markers": "sys_platform == 'darwin'", 149s }, 149s }, 149s }, 149s { 149s "name": "altgraph", 149s "version": "0.17", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "macholib", 149s "version": "1.8", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"altgraph": ">=0.15"}, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"pyinstaller": [], "altgraph": [], "macholib": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][2]["markers"] = "sys_platform == 'darwin'" 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry, skip={"altgraph", "macholib"}) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s # Rationale for the results: 149s # * PyInstaller has an explicit dependency on altgraph, so it must always be 149s # installed. 149s # * PyInstaller requires macholib on Darwin, which in turn requires altgraph. 149s # The dependency graph: 149s # pyinstaller 4.0 PyInstaller bundles a Python application and all its 149s # ├── altgraph * dependencies into a single package. 149s # ├── macholib >=1.8 -- only on Darwin 149s # │ └── altgraph >=0.15 149s expected = { 149s "pyinstaller": Dependency.create_from_pep_508( 149s f"pyinstaller==4.0 ; {MARKER_PY}" 149s ), 149s "altgraph": Dependency.create_from_pep_508( 149s f"altgraph==0.17 ; {MARKER_PY.union(MARKER_PY_DARWIN)}" 149s ), 149s "macholib": Dependency.create_from_pep_508( 149s f"macholib==1.8 ; {MARKER_PY_DARWIN}" 149s ), 149s } 149s 149s for line in content.strip().split("\n"): 149s dependency = Dependency.create_from_pep_508(line) 149s assert dependency.name in expected 149s expected_dependency = expected.pop(dependency.name) 149s assert dependency == expected_dependency 149s > assert dependency.marker == expected_dependency.marker 149s E assert = "3.6" and python_version < "4.0"> == = "3.6" and python_version < "4.0" or python_version == "2.7"> 149s E + where = "3.6" and python_version < "4.0"> = .marker 149s E + and = "3.6" and python_version < "4.0" or python_version == "2.7"> = .marker 149s 149s tests/test_exporter.py:421: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_export_groups[--only main,dev-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tester = 149s do_lock = None, options = '--only main,dev' 149s expected = 'baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 149s 149s @pytest.mark.parametrize( 149s "options, expected", 149s [ 149s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 149s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 149s ( 149s "--with dev,opt", 149s ( 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 149s f" {MARKER_PY}\n" 149s ), 149s ), 149s (f"--without {MAIN_GROUP}", "\n"), 149s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s (f"--without {MAIN_GROUP},dev,opt", "\n"), 149s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 149s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 149s ( 149s f"--only {MAIN_GROUP},dev", 149s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 149s ), 149s ], 149s ) 149s def test_export_groups( 149s tester: CommandTester, do_lock: None, options: str, expected: str 149s ) -> None: 149s tester.execute(options) 149s > assert tester.io.fetch_output() == expected 149s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 149s E 149s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (2 lines hidden), use '-vv' to show 149s 149s tests/command/test_command_export.py:199: AssertionError 149s __________ test_exporter_can_export_requirements_txt_pyinstaller[2.1] __________ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi7') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_pyinstaller( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s """Regression test for #3254""" 149s 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "pyinstaller", 149s "version": "4.0", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": { 149s "altgraph": "*", 149s "macholib": { 149s "version": "*", 149s "markers": "sys_platform == 'darwin'", 149s }, 149s }, 149s }, 149s { 149s "name": "altgraph", 149s "version": "0.17", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "macholib", 149s "version": "1.8", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"altgraph": ">=0.15"}, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"pyinstaller": [], "altgraph": [], "macholib": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][2]["markers"] = "sys_platform == 'darwin'" 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry, skip={"altgraph", "macholib"}) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s # Rationale for the results: 149s # * PyInstaller has an explicit dependency on altgraph, so it must always be 149s # installed. 149s # * PyInstaller requires macholib on Darwin, which in turn requires altgraph. 149s # The dependency graph: 149s # pyinstaller 4.0 PyInstaller bundles a Python application and all its 149s # ├── altgraph * dependencies into a single package. 149s # ├── macholib >=1.8 -- only on Darwin 149s # │ └── altgraph >=0.15 149s expected = { 149s "pyinstaller": Dependency.create_from_pep_508( 149s f"pyinstaller==4.0 ; {MARKER_PY}" 149s ), 149s "altgraph": Dependency.create_from_pep_508( 149s f"altgraph==0.17 ; {MARKER_PY.union(MARKER_PY_DARWIN)}" 149s ), 149s "macholib": Dependency.create_from_pep_508( 149s f"macholib==1.8 ; {MARKER_PY_DARWIN}" 149s ), 149s } 149s 149s for line in content.strip().split("\n"): 149s dependency = Dependency.create_from_pep_508(line) 149s assert dependency.name in expected 149s expected_dependency = expected.pop(dependency.name) 149s assert dependency == expected_dependency 149s > assert dependency.marker == expected_dependency.marker 149s E assert = "3.6" and python_version < "4.0"> == = "3.6" and python_version < "4.0" or python_version == "2.7"> 149s E + where = "3.6" and python_version < "4.0"> = .marker 149s E + and = "3.6" and python_version < "4.0" or python_version == "2.7"> = .marker 149s 149s tests/test_exporter.py:421: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _______ test_exporter_can_export_requirements_txt_with_git_packages[2.1] _______ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi0') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_git_packages( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "git", 149s "url": "https://github.com/foo/foo.git", 149s "reference": "123456", 149s "resolved_reference": "abcdef", 149s }, 149s } 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'foo @ git+ht...ion < "4.0"\n' == 'foo @ git+ht...on == "2.7"\n' 149s E 149s E Skipping 55 identical leading characters in diff, use -v to show 149s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/test_exporter.py:1066: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _____ test_exporter_can_export_requirements_txt_with_nested_packages[1.1] ______ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi1') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_nested_packages( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "git", 149s "url": "https://github.com/foo/foo.git", 149s "reference": "123456", 149s "resolved_reference": "abcdef", 149s }, 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": { 149s "foo": { 149s "git": "https://github.com/foo/foo.git", 149s "rev": "123456", 149s } 149s }, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": [], "bar": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry, skip={"foo"}) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} 149s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 149s E 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - foo @ git+https://github.com/foo/foo.git@abcdef ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (2 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:1122: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _____ test_exporter_can_export_requirements_txt_with_nested_packages[2.1] ______ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi2') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_nested_packages( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "git", 149s "url": "https://github.com/foo/foo.git", 149s "reference": "123456", 149s "resolved_reference": "abcdef", 149s }, 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": { 149s "foo": { 149s "git": "https://github.com/foo/foo.git", 149s "rev": "123456", 149s } 149s }, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": [], "bar": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry, skip={"foo"}) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} 149s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 149s E 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - foo @ git+https://github.com/foo/foo.git@abcdef ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (2 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:1122: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-False-lines0] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi10') 149s poetry = , dev = False 149s lines = ['a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7"'] 149s lock_version = '1.1' 149s 149s @pytest.mark.parametrize( 149s ["dev", "lines"], 149s [ 149s ( 149s False, 149s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 149s ), 149s ( 149s True, 149s [ 149s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 149s f"b==4.5.6 ; {MARKER_PY}", 149s ], 149s ), 149s ], 149s ) 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 149s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "a", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "b", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"a": ">=1.2.3"}, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"a": [], "b": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][0]["groups"] = ["main", "dev"] 149s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 149s lock_data["package"][1]["groups"] = ["dev"] 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s 149s root = poetry.package.with_dependency_groups([], only=True) 149s root.add_dependency( 149s Factory.create_dependency( 149s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 149s ) 149s ) 149s root.add_dependency( 149s Factory.create_dependency( 149s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 149s ) 149s ) 149s poetry._package = root 149s 149s exporter = Exporter(poetry, NullIO()) 149s if dev: 149s exporter.only_groups([MAIN_GROUP, "dev"]) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s > assert content.strip() == "\n".join(lines) 149s E assert 'a==1.2.3 ; p...rsion < "3.8"' == 'a==1.2.3 ; p...sion == "2.7"' 149s E 149s E - a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^^ ^^ ^ ^ 149s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "3.8" 149s E ? + ^ ^ ^^ ^^ ^ ^^^ ^ ^ ^ 149s 149s tests/test_exporter.py:592: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s __ test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[1.1] __ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi3') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_nested_packages_cyclic( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"bar": {"version": "4.5.6"}}, 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"baz": {"version": "7.8.9"}}, 149s }, 149s { 149s "name": "baz", 149s "version": "7.8.9", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"foo": {"version": "1.2.3"}}, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": [], "bar": [], "baz": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry, skip={"bar", "baz"}) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} 149s baz==7.8.9 ; {MARKER_PY} 149s foo==1.2.3 ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 149s E 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (6 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:1176: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-True-lines1] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi11') 149s poetry = , dev = True 149s lines = ['a==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'b==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 149s lock_version = '1.1' 149s 149s @pytest.mark.parametrize( 149s ["dev", "lines"], 149s [ 149s ( 149s False, 149s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 149s ), 149s ( 149s True, 149s [ 149s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 149s f"b==4.5.6 ; {MARKER_PY}", 149s ], 149s ), 149s ], 149s ) 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 149s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "a", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "b", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"a": ">=1.2.3"}, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"a": [], "b": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][0]["groups"] = ["main", "dev"] 149s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 149s lock_data["package"][1]["groups"] = ["dev"] 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s 149s root = poetry.package.with_dependency_groups([], only=True) 149s root.add_dependency( 149s Factory.create_dependency( 149s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 149s ) 149s ) 149s root.add_dependency( 149s Factory.create_dependency( 149s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 149s ) 149s ) 149s poetry._package = root 149s 149s exporter = Exporter(poetry, NullIO()) 149s if dev: 149s exporter.only_groups([MAIN_GROUP, "dev"]) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s > assert content.strip() == "\n".join(lines) 149s E assert 'a==1.2.3 ; p...rsion < "4.0"' == 'a==1.2.3 ; p...sion == "2.7"' 149s E 149s E - a==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - b==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (2 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:592: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s __ test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[2.1] __ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi4') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_nested_packages_cyclic( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"bar": {"version": "4.5.6"}}, 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"baz": {"version": "7.8.9"}}, 149s }, 149s { 149s "name": "baz", 149s "version": "7.8.9", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"foo": {"version": "1.2.3"}}, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": [], "bar": [], "baz": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry, skip={"bar", "baz"}) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} 149s baz==7.8.9 ; {MARKER_PY} 149s foo==1.2.3 ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 149s E 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (6 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:1176: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-False-lines0] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi12') 149s poetry = , dev = False 149s lines = ['a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7"'] 149s lock_version = '2.1' 149s 149s @pytest.mark.parametrize( 149s ["dev", "lines"], 149s [ 149s ( 149s False, 149s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 149s ), 149s ( 149s True, 149s [ 149s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 149s f"b==4.5.6 ; {MARKER_PY}", 149s ], 149s ), 149s ], 149s ) 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 149s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "a", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "b", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"a": ">=1.2.3"}, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"a": [], "b": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][0]["groups"] = ["main", "dev"] 149s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 149s lock_data["package"][1]["groups"] = ["dev"] 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s 149s root = poetry.package.with_dependency_groups([], only=True) 149s root.add_dependency( 149s Factory.create_dependency( 149s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 149s ) 149s ) 149s root.add_dependency( 149s Factory.create_dependency( 149s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 149s ) 149s ) 149s poetry._package = root 149s 149s exporter = Exporter(poetry, NullIO()) 149s if dev: 149s exporter.only_groups([MAIN_GROUP, "dev"]) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s > assert content.strip() == "\n".join(lines) 149s E assert 'a==1.2.3 ; p...rsion < "3.8"' == 'a==1.2.3 ; p...sion == "2.7"' 149s E 149s E - a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^^ ^^ ^ ^ 149s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "3.8" 149s E ? + ^ ^ ^^ ^^ ^ ^^^ ^ ^ ^ 149s 149s tests/test_exporter.py:592: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_circular_root_dependency[1.1] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi5') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_circular_root_dependency( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {poetry.package.pretty_name: {"version": "1.2.3"}}, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s foo==1.2.3 ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'foo==1.2.3 ;...ion < "4.0"\n' == 'foo==1.2.3 ;...on == "2.7"\n' 149s E 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/test_exporter.py:1214: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-True-lines1] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi13') 149s poetry = , dev = True 149s lines = ['a==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'b==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 149s lock_version = '2.1' 149s 149s @pytest.mark.parametrize( 149s ["dev", "lines"], 149s [ 149s ( 149s False, 149s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 149s ), 149s ( 149s True, 149s [ 149s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 149s f"b==4.5.6 ; {MARKER_PY}", 149s ], 149s ), 149s ], 149s ) 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 149s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "a", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "b", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {"a": ">=1.2.3"}, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"a": [], "b": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][0]["groups"] = ["main", "dev"] 149s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 149s lock_data["package"][1]["groups"] = ["dev"] 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s 149s root = poetry.package.with_dependency_groups([], only=True) 149s root.add_dependency( 149s Factory.create_dependency( 149s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 149s ) 149s ) 149s root.add_dependency( 149s Factory.create_dependency( 149s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 149s ) 149s ) 149s poetry._package = root 149s 149s exporter = Exporter(poetry, NullIO()) 149s if dev: 149s exporter.only_groups([MAIN_GROUP, "dev"]) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s > assert content.strip() == "\n".join(lines) 149s E assert 'a==1.2.3 ; p...rsion < "4.0"' == 'a==1.2.3 ; p...sion == "2.7"' 149s E 149s E - a==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - b==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (2 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:592: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_circular_root_dependency[2.1] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi6') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_circular_root_dependency( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": {poetry.package.pretty_name: {"version": "1.2.3"}}, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s foo==1.2.3 ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'foo==1.2.3 ;...ion < "4.0"\n' == 'foo==1.2.3 ;...on == "2.7"\n' 149s E 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/test_exporter.py:1214: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[1.1] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi14') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [{"name": "foo.whl", "hash": "12345"}], 149s "bar": [{"name": "bar.whl", "hash": "67890"}], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} \\ 149s --hash=sha256:67890 149s foo==1.2.3 ; {MARKER_PY} \\ 149s --hash=sha256:12345 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 149s E 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E --hash=sha256:67890 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 149s E 149s E ...Full output truncated (4 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:641: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[1.1] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi7') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": { 149s "bar": [ 149s { 149s "version": ">=1.2.3,<7.8.10", 149s "markers": 'platform_system != "Windows"', 149s }, 149s { 149s "version": ">=4.5.6,<7.8.10", 149s "markers": 'platform_system == "Windows"', 149s }, 149s ] 149s }, 149s }, 149s { 149s "name": "bar", 149s "version": "7.8.9", 149s "optional": True, 149s "python-versions": "*", 149s "dependencies": { 149s "baz": { 149s "version": "!=10.11.12", 149s "markers": 'platform_system == "Windows"', 149s } 149s }, 149s }, 149s { 149s "name": "baz", 149s "version": "10.11.13", 149s "optional": True, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": [], "bar": [], "baz": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][2]["markers"] = 'platform_system == "Windows"' 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.with_hashes(False) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s marker_py_not_windows = MARKER_PY.intersect( 149s parse_marker('platform_system != "Windows"') 149s ) 149s expected = f"""\ 149s bar==7.8.9 ; {marker_py_not_windows.union(MARKER_PY_WINDOWS)} 149s baz==10.11.13 ; {MARKER_PY_WINDOWS} 149s foo==1.2.3 ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 149s E 149s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - baz==10.11.13 ; (python_version >= "3.6" or python_version == "2.7") and platform_system == "Windows" and python_version < "4.0" 149s E + baz==10.11.13 ; (python_version == "2.7" or python_version >= "3.6") and python_version < "4.0" and platform_system == "Windows"... 149s E 149s E ...Full output truncated (4 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:1289: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[2.1] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi15') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [{"name": "foo.whl", "hash": "12345"}], 149s "bar": [{"name": "bar.whl", "hash": "67890"}], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} \\ 149s --hash=sha256:67890 149s foo==1.2.3 ; {MARKER_PY} \\ 149s --hash=sha256:12345 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 149s E 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E --hash=sha256:67890 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 149s E 149s E ...Full output truncated (4 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:641: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[2.1] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi8') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "dependencies": { 149s "bar": [ 149s { 149s "version": ">=1.2.3,<7.8.10", 149s "markers": 'platform_system != "Windows"', 149s }, 149s { 149s "version": ">=4.5.6,<7.8.10", 149s "markers": 'platform_system == "Windows"', 149s }, 149s ] 149s }, 149s }, 149s { 149s "name": "bar", 149s "version": "7.8.9", 149s "optional": True, 149s "python-versions": "*", 149s "dependencies": { 149s "baz": { 149s "version": "!=10.11.12", 149s "markers": 'platform_system == "Windows"', 149s } 149s }, 149s }, 149s { 149s "name": "baz", 149s "version": "10.11.13", 149s "optional": True, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": [], "bar": [], "baz": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][2]["markers"] = 'platform_system == "Windows"' 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.with_hashes(False) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s marker_py_not_windows = MARKER_PY.intersect( 149s parse_marker('platform_system != "Windows"') 149s ) 149s expected = f"""\ 149s bar==7.8.9 ; {marker_py_not_windows.union(MARKER_PY_WINDOWS)} 149s baz==10.11.13 ; {MARKER_PY_WINDOWS} 149s foo==1.2.3 ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 149s E 149s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - baz==10.11.13 ; (python_version >= "3.6" or python_version == "2.7") and platform_system == "Windows" and python_version < "4.0" 149s E + baz==10.11.13 ; (python_version == "2.7" or python_version >= "3.6") and python_version < "4.0" and platform_system == "Windows"... 149s E 149s E ...Full output truncated (4 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:1289: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[1.1] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi16') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [ 149s {"name": "foo1.whl", "hash": "67890"}, 149s {"name": "foo2.whl", "hash": "12345"}, 149s ], 149s "bar": [ 149s {"name": "bar1.whl", "hash": "67890"}, 149s {"name": "bar2.whl", "hash": "12345"}, 149s ], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} \\ 149s --hash=sha256:12345 \\ 149s --hash=sha256:67890 149s foo==1.2.3 ; {MARKER_PY} \\ 149s --hash=sha256:12345 \\ 149s --hash=sha256:67890 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...ha256:67890\n' == 'bar==4.5.6 ;...ha256:67890\n' 149s E 149s E Skipping 45 identical trailing characters in diff, use -v to show 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E --hash=sha256:12345 \... 149s E 149s E ...Full output truncated (6 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:698: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[2.1] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi17') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [ 149s {"name": "foo1.whl", "hash": "67890"}, 149s {"name": "foo2.whl", "hash": "12345"}, 149s ], 149s "bar": [ 149s {"name": "bar1.whl", "hash": "67890"}, 149s {"name": "bar2.whl", "hash": "12345"}, 149s ], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} \\ 149s --hash=sha256:12345 \\ 149s --hash=sha256:67890 149s foo==1.2.3 ; {MARKER_PY} \\ 149s --hash=sha256:12345 \\ 149s --hash=sha256:67890 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...ha256:67890\n' == 'bar==4.5.6 ;...ha256:67890\n' 149s E 149s E Skipping 45 identical trailing characters in diff, use -v to show 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E --hash=sha256:12345 \... 149s E 149s E ...Full output truncated (6 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:698: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s ____ test_exporter_can_export_requirements_txt_with_directory_packages[1.1] ____ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi11') 149s poetry = 149s fixture_root_uri = 'file:///tmp/autopkgtest.UGvsHB/autopkgtest_tmp/build/tests/fixtures' 149s lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_directory_packages( 149s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "directory", 149s "url": "sample_project", 149s "reference": "", 149s }, 149s } 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 149s E 149s E Skipping 96 identical leading characters in diff, use -v to show 149s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/test_exporter.py:1376: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[1.1] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi18') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [{"name": "foo.whl", "hash": "12345"}], 149s "bar": [{"name": "bar.whl", "hash": "67890"}], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.with_hashes(False) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} 149s foo==1.2.3 ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 149s E 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (2 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:746: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s ____ test_exporter_can_export_requirements_txt_with_directory_packages[2.1] ____ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi12') 149s poetry = 149s fixture_root_uri = 'file:///tmp/autopkgtest.UGvsHB/autopkgtest_tmp/build/tests/fixtures' 149s lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_directory_packages( 149s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "directory", 149s "url": "sample_project", 149s "reference": "", 149s }, 149s } 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 149s E 149s E Skipping 96 identical leading characters in diff, use -v to show 149s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/test_exporter.py:1376: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[2.1] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi19') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [{"name": "foo.whl", "hash": "12345"}], 149s "bar": [{"name": "bar.whl", "hash": "67890"}], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.with_hashes(False) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} 149s foo==1.2.3 ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 149s E 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (2 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:746: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_directory_packages_editable[1.1] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi13') 149s poetry = 149s fixture_root_uri = 'file:///tmp/autopkgtest.UGvsHB/autopkgtest_tmp/build/tests/fixtures' 149s lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_directory_packages_editable( 149s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "develop": True, 149s "source": { 149s "type": "directory", 149s "url": "sample_project", 149s "reference": "", 149s }, 149s } 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s -e {fixture_root_uri}/sample_project ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert '-e file:///t...ion < "4.0"\n' == '-e file:///t...on == "2.7"\n' 149s E 149s E Skipping 93 identical leading characters in diff, use -v to show 149s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/test_exporter.py:1419: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_exports_requirements_txt_without_dev_packages_by_default[1.1] __ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem0') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_exports_requirements_txt_without_dev_packages_by_default( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [{"name": "foo.whl", "hash": "12345"}], 149s "bar": [{"name": "bar.whl", "hash": "67890"}], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][1]["groups"] = ["dev"] 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry, dev={"bar"}) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s foo==1.2.3 ; {MARKER_PY} \\ 149s --hash=sha256:12345 149s """ 149s 149s > assert content == expected 149s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 149s E 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E --hash=sha256:12345 149s 149s tests/test_exporter.py:795: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_directory_packages_editable[2.1] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi14') 149s poetry = 149s fixture_root_uri = 'file:///tmp/autopkgtest.UGvsHB/autopkgtest_tmp/build/tests/fixtures' 149s lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_directory_packages_editable( 149s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "develop": True, 149s "source": { 149s "type": "directory", 149s "url": "sample_project", 149s "reference": "", 149s }, 149s } 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s -e {fixture_root_uri}/sample_project ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert '-e file:///t...ion < "4.0"\n' == '-e file:///t...on == "2.7"\n' 149s E 149s E Skipping 93 identical leading characters in diff, use -v to show 149s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/test_exporter.py:1419: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_exports_requirements_txt_without_dev_packages_by_default[2.1] __ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem1') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_exports_requirements_txt_without_dev_packages_by_default( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [{"name": "foo.whl", "hash": "12345"}], 149s "bar": [{"name": "bar.whl", "hash": "67890"}], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][1]["groups"] = ["dev"] 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry, dev={"bar"}) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s foo==1.2.3 ; {MARKER_PY} \\ 149s --hash=sha256:12345 149s """ 149s 149s > assert content == expected 149s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 149s E 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E --hash=sha256:12345 149s 149s tests/test_exporter.py:795: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_nested_directory_packages[1.1] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi15') 149s poetry = 149s fixture_root_uri = 'file:///tmp/autopkgtest.UGvsHB/autopkgtest_tmp/build/tests/fixtures' 149s lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_nested_directory_packages( 149s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "directory", 149s "url": "sample_project", 149s "reference": "", 149s }, 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "directory", 149s "url": "sample_project/../project_with_nested_local/bar", 149s "reference": "", 149s }, 149s }, 149s { 149s "name": "baz", 149s "version": "7.8.9", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "directory", 149s "url": "sample_project/../project_with_nested_local/bar/..", 149s "reference": "", 149s }, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": [], "bar": [], "baz": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar @ {fixture_root_uri}/project_with_nested_local/bar ; {MARKER_PY} 149s baz @ {fixture_root_uri}/project_with_nested_local ; {MARKER_PY} 149s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'bar @ file:/...ion < "4.0"\n' == 'bar @ file:/...on == "2.7"\n' 149s E 149s E Skipping 111 identical leading characters in diff, use -v to show 149s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - baz @ file:///tmp/autopkgtest.UGvsHB/autopkgtest_tmp/build/tests/fixtures/project_with_nested_local ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 149s E 149s E ...Full output truncated (7 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:1485: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s __ test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[1.1] ___ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem2') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [{"name": "foo.whl", "hash": "12345"}], 149s "bar": [{"name": "bar.whl", "hash": "67890"}], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][1]["groups"] = ["dev"] 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry, dev={"bar"}) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.only_groups([MAIN_GROUP, "dev"]) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} \\ 149s --hash=sha256:67890 149s foo==1.2.3 ; {MARKER_PY} \\ 149s --hash=sha256:12345 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 149s E 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E --hash=sha256:67890 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 149s E 149s E ...Full output truncated (4 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:847: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_can_export_requirements_txt_with_nested_directory_packages[2.1] _ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi16') 149s poetry = 149s fixture_root_uri = 'file:///tmp/autopkgtest.UGvsHB/autopkgtest_tmp/build/tests/fixtures' 149s lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_nested_directory_packages( 149s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "directory", 149s "url": "sample_project", 149s "reference": "", 149s }, 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "directory", 149s "url": "sample_project/../project_with_nested_local/bar", 149s "reference": "", 149s }, 149s }, 149s { 149s "name": "baz", 149s "version": "7.8.9", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "directory", 149s "url": "sample_project/../project_with_nested_local/bar/..", 149s "reference": "", 149s }, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": [], "bar": [], "baz": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar @ {fixture_root_uri}/project_with_nested_local/bar ; {MARKER_PY} 149s baz @ {fixture_root_uri}/project_with_nested_local ; {MARKER_PY} 149s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'bar @ file:/...ion < "4.0"\n' == 'bar @ file:/...on == "2.7"\n' 149s E 149s E Skipping 111 identical leading characters in diff, use -v to show 149s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - baz @ file:///tmp/autopkgtest.UGvsHB/autopkgtest_tmp/build/tests/fixtures/project_with_nested_local ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 149s E 149s E ...Full output truncated (7 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:1485: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s __ test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[2.1] ___ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem3') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [{"name": "foo.whl", "hash": "12345"}], 149s "bar": [{"name": "bar.whl", "hash": "67890"}], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][1]["groups"] = ["dev"] 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry, dev={"bar"}) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.only_groups([MAIN_GROUP, "dev"]) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} \\ 149s --hash=sha256:67890 149s foo==1.2.3 ; {MARKER_PY} \\ 149s --hash=sha256:12345 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 149s E 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E --hash=sha256:67890 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 149s E 149s E ...Full output truncated (4 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:847: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s ______ test_exporter_can_export_requirements_txt_with_file_packages[1.1] _______ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi19') 149s poetry = 149s fixture_root_uri = 'file:///tmp/autopkgtest.UGvsHB/autopkgtest_tmp/build/tests/fixtures' 149s lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_file_packages( 149s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "file", 149s "url": "distributions/demo-0.1.0.tar.gz", 149s "reference": "", 149s }, 149s } 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s foo @ {fixture_root_uri}/distributions/demo-0.1.0.tar.gz ;\ 149s {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 149s E 149s E Skipping 113 identical leading characters in diff, use -v to show 149s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/test_exporter.py:1573: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s ____ test_exporter_exports_requirements_txt_without_optional_packages[1.1] _____ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem6') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_exports_requirements_txt_without_optional_packages( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": True, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [{"name": "foo.whl", "hash": "12345"}], 149s "bar": [{"name": "bar.whl", "hash": "67890"}], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][1]["groups"] = ["dev"] 149s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry, dev={"bar"}) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.only_groups([MAIN_GROUP, "dev"]) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s foo==1.2.3 ; {MARKER_PY} \\ 149s --hash=sha256:12345 149s """ 149s 149s > assert content == expected 149s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 149s E 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E --hash=sha256:12345 149s 149s tests/test_exporter.py:943: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s ______ test_exporter_can_export_requirements_txt_with_file_packages[2.1] _______ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi20') 149s poetry = 149s fixture_root_uri = 'file:///tmp/autopkgtest.UGvsHB/autopkgtest_tmp/build/tests/fixtures' 149s lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_file_packages( 149s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "file", 149s "url": "distributions/demo-0.1.0.tar.gz", 149s "reference": "", 149s }, 149s } 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s foo @ {fixture_root_uri}/distributions/demo-0.1.0.tar.gz ;\ 149s {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 149s E 149s E Skipping 113 identical leading characters in diff, use -v to show 149s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/test_exporter.py:1573: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s ____ test_exporter_exports_requirements_txt_without_optional_packages[2.1] _____ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem7') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_exports_requirements_txt_without_optional_packages( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": True, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [{"name": "foo.whl", "hash": "12345"}], 149s "bar": [{"name": "bar.whl", "hash": "67890"}], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][1]["groups"] = ["dev"] 149s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry, dev={"bar"}) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.only_groups([MAIN_GROUP, "dev"]) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s foo==1.2.3 ; {MARKER_PY} \\ 149s --hash=sha256:12345 149s """ 149s 149s > assert content == expected 149s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 149s E 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E --hash=sha256:12345 149s 149s tests/test_exporter.py:943: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_exports_requirements_txt_with_optional_packages[1.1-extras0-lines0] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem8') 149s poetry = 149s extras = ['feature-bar'] 149s lines = ['bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'foo==1.2.3 ; python_ve...ython_version == "2.7"', 'spam==0.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 149s lock_version = '1.1' 149s 149s @pytest.mark.parametrize( 149s ["extras", "lines"], 149s [ 149s ( 149s ["feature-bar"], 149s [ 149s f"bar==4.5.6 ; {MARKER_PY}", 149s f"foo==1.2.3 ; {MARKER_PY}", 149s f"spam==0.1.0 ; {MARKER_PY}", 149s ], 149s ), 149s ], 149s ) 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_exports_requirements_txt_with_optional_packages( 149s tmp_path: Path, 149s poetry: Poetry, 149s extras: Collection[NormalizedName], 149s lines: list[str], 149s lock_version: str, 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": True, 149s "python-versions": "*", 149s "dependencies": {"spam": ">=0.1"}, 149s }, 149s { 149s "name": "spam", 149s "version": "0.1.0", 149s "optional": True, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [{"name": "foo.whl", "hash": "12345"}], 149s "bar": [{"name": "bar.whl", "hash": "67890"}], 149s "spam": [{"name": "spam.whl", "hash": "abcde"}], 149s }, 149s }, 149s "extras": {"feature_bar": ["bar"]}, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 149s lock_data["package"][2]["markers"] = 'extra == "feature-bar"' 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.only_groups([MAIN_GROUP, "dev"]) 149s exporter.with_hashes(False) 149s exporter.with_extras(extras) 149s exporter.export( 149s "requirements.txt", 149s tmp_path, 149s "requirements.txt", 149s ) 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = "\n".join(lines) 149s 149s > assert content.strip() == expected 149s E assert 'bar==4.5.6 ;...rsion < "4.0"' == 'bar==4.5.6 ;...sion == "2.7"' 149s E 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (6 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:1023: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _______ test_exporter_exports_requirements_txt_with_legacy_packages[1.1] _______ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem0') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_exports_requirements_txt_with_legacy_packages( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s poetry.pool.add_repository( 149s LegacyRepository( 149s "custom", 149s "https://example.com/simple", 149s ) 149s ) 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "legacy", 149s "url": "https://example.com/simple", 149s "reference": "", 149s }, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [{"name": "foo.whl", "hash": "12345"}], 149s "bar": [{"name": "bar.whl", "hash": "67890"}], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][1]["groups"] = ["dev"] 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry, dev={"bar"}) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.only_groups([MAIN_GROUP, "dev"]) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s --extra-index-url https://example.com/simple 149s 149s bar==4.5.6 ; {MARKER_PY} \\ 149s --hash=sha256:67890 149s foo==1.2.3 ; {MARKER_PY} \\ 149s --hash=sha256:12345 149s """ 149s 149s > assert content == expected 149s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 149s E 149s E Skipping 64 identical leading characters in diff, use -v to show 149s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E --hash=sha256:67890... 149s E 149s E ...Full output truncated (5 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:1683: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_exports_requirements_txt_with_optional_packages[2.1-extras0-lines0] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem9') 149s poetry = 149s extras = ['feature-bar'] 149s lines = ['bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'foo==1.2.3 ; python_ve...ython_version == "2.7"', 'spam==0.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 149s lock_version = '2.1' 149s 149s @pytest.mark.parametrize( 149s ["extras", "lines"], 149s [ 149s ( 149s ["feature-bar"], 149s [ 149s f"bar==4.5.6 ; {MARKER_PY}", 149s f"foo==1.2.3 ; {MARKER_PY}", 149s f"spam==0.1.0 ; {MARKER_PY}", 149s ], 149s ), 149s ], 149s ) 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_exports_requirements_txt_with_optional_packages( 149s tmp_path: Path, 149s poetry: Poetry, 149s extras: Collection[NormalizedName], 149s lines: list[str], 149s lock_version: str, 149s ) -> None: 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": True, 149s "python-versions": "*", 149s "dependencies": {"spam": ">=0.1"}, 149s }, 149s { 149s "name": "spam", 149s "version": "0.1.0", 149s "optional": True, 149s "python-versions": "*", 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [{"name": "foo.whl", "hash": "12345"}], 149s "bar": [{"name": "bar.whl", "hash": "67890"}], 149s "spam": [{"name": "spam.whl", "hash": "abcde"}], 149s }, 149s }, 149s "extras": {"feature_bar": ["bar"]}, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 149s lock_data["package"][2]["markers"] = 'extra == "feature-bar"' 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.only_groups([MAIN_GROUP, "dev"]) 149s exporter.with_hashes(False) 149s exporter.with_extras(extras) 149s exporter.export( 149s "requirements.txt", 149s tmp_path, 149s "requirements.txt", 149s ) 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = "\n".join(lines) 149s 149s > assert content.strip() == expected 149s E assert 'bar==4.5.6 ;...rsion < "4.0"' == 'bar==4.5.6 ;...sion == "2.7"' 149s E 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 149s E 149s E ...Full output truncated (6 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:1023: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _______ test_exporter_exports_requirements_txt_with_legacy_packages[2.1] _______ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem1') 149s poetry = , lock_version = '2.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_exports_requirements_txt_with_legacy_packages( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s poetry.pool.add_repository( 149s LegacyRepository( 149s "custom", 149s "https://example.com/simple", 149s ) 149s ) 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "legacy", 149s "url": "https://example.com/simple", 149s "reference": "", 149s }, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [{"name": "foo.whl", "hash": "12345"}], 149s "bar": [{"name": "bar.whl", "hash": "67890"}], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][1]["groups"] = ["dev"] 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry, dev={"bar"}) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.only_groups([MAIN_GROUP, "dev"]) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s --extra-index-url https://example.com/simple 149s 149s bar==4.5.6 ; {MARKER_PY} \\ 149s --hash=sha256:67890 149s foo==1.2.3 ; {MARKER_PY} \\ 149s --hash=sha256:12345 149s """ 149s 149s > assert content == expected 149s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 149s E 149s E Skipping 64 identical leading characters in diff, use -v to show 149s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E --hash=sha256:67890... 149s E 149s E ...Full output truncated (5 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:1683: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _______ test_exporter_can_export_requirements_txt_with_git_packages[1.1] _______ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi20') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_can_export_requirements_txt_with_git_packages( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s lock_data = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "git", 149s "url": "https://github.com/foo/foo.git", 149s "reference": "123456", 149s "resolved_reference": "abcdef", 149s }, 149s } 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": {"foo": []}, 149s }, 149s } 149s fix_lock_data(lock_data) 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 149s """ 149s 149s > assert content == expected 149s E assert 'foo @ git+ht...ion < "4.0"\n' == 'foo @ git+ht...on == "2.7"\n' 149s E 149s E Skipping 55 identical leading characters in diff, use -v to show 149s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s 149s tests/test_exporter.py:1066: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s __________ test_exporter_exports_requirements_txt_with_url_false[1.1] __________ 149s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem2') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_exports_requirements_txt_with_url_false( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s poetry.pool.add_repository( 149s LegacyRepository( 149s "custom", 149s "https://example.com/simple", 149s ) 149s ) 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "legacy", 149s "url": "https://example.com/simple", 149s "reference": "", 149s }, 149s }, 149s ], 149s "metadata": { 149s "lock-version": lock_version, 149s "python-versions": "*", 149s "content-hash": "123456789", 149s "files": { 149s "foo": [{"name": "foo.whl", "hash": "12345"}], 149s "bar": [{"name": "bar.whl", "hash": "67890"}], 149s }, 149s }, 149s } 149s fix_lock_data(lock_data) 149s if lock_version == "2.1": 149s lock_data["package"][1]["groups"] = ["dev"] 149s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 149s set_package_requires(poetry, dev={"bar"}) 149s 149s exporter = Exporter(poetry, NullIO()) 149s exporter.only_groups([MAIN_GROUP, "dev"]) 149s exporter.with_urls(False) 149s exporter.export("requirements.txt", tmp_path, "requirements.txt") 149s 149s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 149s content = f.read() 149s 149s expected = f"""\ 149s bar==4.5.6 ; {MARKER_PY} \\ 149s --hash=sha256:67890 149s foo==1.2.3 ; {MARKER_PY} \\ 149s --hash=sha256:12345 149s """ 149s 149s > assert content == expected 149s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 149s E 149s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 149s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 149s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 149s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 149s E --hash=sha256:67890 149s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 149s E 149s E ...Full output truncated (4 lines hidden), use '-vv' to show 149s 149s tests/test_exporter.py:1747: AssertionError 149s ------------------------------ Captured log setup ------------------------------ 149s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 149s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[1.1] _ 149s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 149s 149s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem10') 149s poetry = , lock_version = '1.1' 149s 149s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 149s def test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources( 149s tmp_path: Path, poetry: Poetry, lock_version: str 149s ) -> None: 149s poetry.pool.add_repository( 149s LegacyRepository( 149s "custom-example", 149s "https://example.com/simple", 149s ) 149s ) 149s poetry.pool.add_repository( 149s LegacyRepository( 149s "custom-foobaz", 149s "https://foobaz.com/simple", 149s ) 149s ) 149s lock_data: dict[str, Any] = { 149s "package": [ 149s { 149s "name": "foo", 149s "version": "1.2.3", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "legacy", 149s "url": "https://example.com/simple", 149s "reference": "", 149s }, 149s }, 149s { 149s "name": "bar", 149s "version": "4.5.6", 149s "optional": False, 149s "python-versions": "*", 149s "source": { 149s "type": "legacy", 149s "url": "https://example.com/simple", 149s "reference": "", 150s }, 150s }, 150s { 150s "name": "baz", 150s "version": "7.8.9", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://foobaz.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s "baz": [{"name": "baz.whl", "hash": "24680"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][1]["groups"] = ["dev"] 150s lock_data["package"][2]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar", "baz"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected = f"""\ 150s --extra-index-url https://example.com/simple 150s --extra-index-url https://foobaz.com/simple 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s baz==7.8.9 ; {MARKER_PY} \\ 150s --hash=sha256:24680 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected 150s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 150s E 150s E Skipping 108 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (10 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:1972: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s __________ test_exporter_exports_requirements_txt_with_url_false[2.1] __________ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem3') 150s poetry = , lock_version = '2.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_requirements_txt_with_url_false( 150s tmp_path: Path, poetry: Poetry, lock_version: str 150s ) -> None: 150s poetry.pool.add_repository( 150s LegacyRepository( 150s "custom", 150s "https://example.com/simple", 150s ) 150s ) 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][1]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.with_urls(False) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected = f"""\ 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected 150s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 150s E 150s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890 150s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 150s E 150s E ...Full output truncated (4 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:1747: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[2.1] _ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem11') 150s poetry = , lock_version = '2.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources( 150s tmp_path: Path, poetry: Poetry, lock_version: str 150s ) -> None: 150s poetry.pool.add_repository( 150s LegacyRepository( 150s "custom-example", 150s "https://example.com/simple", 150s ) 150s ) 150s poetry.pool.add_repository( 150s LegacyRepository( 150s "custom-foobaz", 150s "https://foobaz.com/simple", 150s ) 150s ) 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "baz", 150s "version": "7.8.9", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://foobaz.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s "baz": [{"name": "baz.whl", "hash": "24680"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][1]["groups"] = ["dev"] 150s lock_data["package"][2]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar", "baz"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected = f"""\ 150s --extra-index-url https://example.com/simple 150s --extra-index-url https://foobaz.com/simple 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s baz==7.8.9 ; {MARKER_PY} \\ 150s --hash=sha256:24680 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected 150s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 150s E 150s E Skipping 108 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (10 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:1972: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _ test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[1.1] _ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem4') 150s poetry = , lock_version = '1.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host( 150s tmp_path: Path, poetry: Poetry, lock_version: str 150s ) -> None: 150s poetry.pool.add_repository( 150s LegacyRepository( 150s "custom", 150s "http://example.com/simple", 150s ) 150s ) 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "http://example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected = f"""\ 150s --trusted-host example.com 150s --extra-index-url http://example.com/simple 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s """ 150s 150s > assert content == expected 150s E assert '--trusted-ho...ha256:67890\n' == '--trusted-ho...ha256:67890\n' 150s E 150s E Skipping 90 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890 150s 150s tests/test_exporter.py:1803: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____ test_exporter_exports_requirements_txt_with_two_primary_sources[1.1] _____ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem12') 150s poetry = , lock_version = '1.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_requirements_txt_with_two_primary_sources( 150s tmp_path: Path, poetry: Poetry, lock_version: str 150s ) -> None: 150s poetry.pool.remove_repository("PyPI") 150s poetry.config.merge( 150s { 150s "repositories": { 150s "custom-a": {"url": "https://a.example.com/simple"}, 150s "custom-b": {"url": "https://b.example.com/simple"}, 150s }, 150s "http-basic": { 150s "custom-a": {"username": "foo", "password": "bar"}, 150s "custom-b": {"username": "baz", "password": "qux"}, 150s }, 150s } 150s ) 150s poetry.pool.add_repository( 150s LegacyRepository( 150s "custom-b", 150s "https://b.example.com/simple", 150s config=poetry.config, 150s ), 150s ) 150s poetry.pool.add_repository( 150s LegacyRepository( 150s "custom-a", 150s "https://a.example.com/simple", 150s config=poetry.config, 150s ), 150s ) 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "baz", 150s "version": "7.8.9", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s "baz": [{"name": "baz.whl", "hash": "24680"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][1]["groups"] = ["dev"] 150s lock_data["package"][2]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar", "baz"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.with_credentials() 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected = f"""\ 150s --index-url https://baz:qux@b.example.com/simple 150s --extra-index-url https://foo:bar@a.example.com/simple 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s baz==7.8.9 ; {MARKER_PY} \\ 150s --hash=sha256:24680 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected 150s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 150s E 150s E Skipping 123 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (10 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:2080: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _ test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[2.1] _ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem5') 150s poetry = , lock_version = '2.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host( 150s tmp_path: Path, poetry: Poetry, lock_version: str 150s ) -> None: 150s poetry.pool.add_repository( 150s LegacyRepository( 150s "custom", 150s "http://example.com/simple", 150s ) 150s ) 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "http://example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected = f"""\ 150s --trusted-host example.com 150s --extra-index-url http://example.com/simple 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s """ 150s 150s > assert content == expected 150s E assert '--trusted-ho...ha256:67890\n' == '--trusted-ho...ha256:67890\n' 150s E 150s E Skipping 90 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890 150s 150s tests/test_exporter.py:1803: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____ test_exporter_exports_requirements_txt_with_two_primary_sources[2.1] _____ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem13') 150s poetry = , lock_version = '2.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_requirements_txt_with_two_primary_sources( 150s tmp_path: Path, poetry: Poetry, lock_version: str 150s ) -> None: 150s poetry.pool.remove_repository("PyPI") 150s poetry.config.merge( 150s { 150s "repositories": { 150s "custom-a": {"url": "https://a.example.com/simple"}, 150s "custom-b": {"url": "https://b.example.com/simple"}, 150s }, 150s "http-basic": { 150s "custom-a": {"username": "foo", "password": "bar"}, 150s "custom-b": {"username": "baz", "password": "qux"}, 150s }, 150s } 150s ) 150s poetry.pool.add_repository( 150s LegacyRepository( 150s "custom-b", 150s "https://b.example.com/simple", 150s config=poetry.config, 150s ), 150s ) 150s poetry.pool.add_repository( 150s LegacyRepository( 150s "custom-a", 150s "https://a.example.com/simple", 150s config=poetry.config, 150s ), 150s ) 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "baz", 150s "version": "7.8.9", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s "baz": [{"name": "baz.whl", "hash": "24680"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][1]["groups"] = ["dev"] 150s lock_data["package"][2]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar", "baz"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.with_credentials() 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected = f"""\ 150s --index-url https://baz:qux@b.example.com/simple 150s --extra-index-url https://foo:bar@a.example.com/simple 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s baz==7.8.9 ; {MARKER_PY} \\ 150s --hash=sha256:24680 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected 150s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 150s E 150s E Skipping 123 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (10 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:2080: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s __ test_exporter_exports_requirements_txt_with_dev_extras[1.1-True-expected0] __ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem6') 150s poetry = , dev = True 150s expected = ['bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'baz==1.2.3 ; python_ve...python_version == "2.7"', 'foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 150s lock_version = '1.1' 150s 150s @pytest.mark.parametrize( 150s ["dev", "expected"], 150s [ 150s ( 150s True, 150s [ 150s f"bar==1.2.2 ; {MARKER_PY}", 150s f"baz==1.2.3 ; {MARKER_PY}", 150s f"foo==1.2.1 ; {MARKER_PY}", 150s ], 150s ), 150s ( 150s False, 150s [ 150s f"bar==1.2.2 ; {MARKER_PY}", 150s f"foo==1.2.1 ; {MARKER_PY}", 150s ], 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_requirements_txt_with_dev_extras( 150s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 150s ) -> None: 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.1", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s { 150s "name": "bar", 150s "version": "1.2.2", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": { 150s "baz": { 150s "version": ">=0.1.0", 150s "optional": True, 150s "markers": "extra == 'baz'", 150s } 150s }, 150s "extras": {"baz": ["baz (>=0.1.0)"]}, 150s }, 150s { 150s "name": "baz", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": {"foo": [], "bar": [], "baz": []}, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][2]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"baz"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s if dev: 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s > assert content == "\n".join(expected) + "\n" 150s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 150s E 150s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E - baz==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 150s E 150s E ...Full output truncated (6 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:1880: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[1.1] _ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem14') 150s poetry = 150s config = , lock_version = '1.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials( 150s tmp_path: Path, poetry: Poetry, config: Config, lock_version: str 150s ) -> None: 150s poetry.config.merge( 150s { 150s "repositories": {"custom": {"url": "https://example.com/simple"}}, 150s "http-basic": {"custom": {"username": "foo", "password": "bar"}}, 150s } 150s ) 150s poetry.pool.add_repository( 150s LegacyRepository("custom", "https://example.com/simple", config=poetry.config) 150s ) 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][1]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.with_credentials() 150s exporter.export( 150s "requirements.txt", 150s tmp_path, 150s "requirements.txt", 150s ) 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected = f"""\ 150s --extra-index-url https://foo:bar@example.com/simple 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected 150s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 150s E 150s E Skipping 72 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:2153: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _ test_exporter_exports_requirements_txt_with_dev_extras[1.1-False-expected1] __ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem7') 150s poetry = , dev = False 150s expected = ['bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 150s lock_version = '1.1' 150s 150s @pytest.mark.parametrize( 150s ["dev", "expected"], 150s [ 150s ( 150s True, 150s [ 150s f"bar==1.2.2 ; {MARKER_PY}", 150s f"baz==1.2.3 ; {MARKER_PY}", 150s f"foo==1.2.1 ; {MARKER_PY}", 150s ], 150s ), 150s ( 150s False, 150s [ 150s f"bar==1.2.2 ; {MARKER_PY}", 150s f"foo==1.2.1 ; {MARKER_PY}", 150s ], 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_requirements_txt_with_dev_extras( 150s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 150s ) -> None: 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.1", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s { 150s "name": "bar", 150s "version": "1.2.2", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": { 150s "baz": { 150s "version": ">=0.1.0", 150s "optional": True, 150s "markers": "extra == 'baz'", 150s } 150s }, 150s "extras": {"baz": ["baz (>=0.1.0)"]}, 150s }, 150s { 150s "name": "baz", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": {"foo": [], "bar": [], "baz": []}, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][2]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"baz"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s if dev: 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s > assert content == "\n".join(expected) + "\n" 150s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 150s E 150s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E - foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 150s E 150s E ...Full output truncated (2 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:1880: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[2.1] _ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem15') 150s poetry = 150s config = , lock_version = '2.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials( 150s tmp_path: Path, poetry: Poetry, config: Config, lock_version: str 150s ) -> None: 150s poetry.config.merge( 150s { 150s "repositories": {"custom": {"url": "https://example.com/simple"}}, 150s "http-basic": {"custom": {"username": "foo", "password": "bar"}}, 150s } 150s ) 150s poetry.pool.add_repository( 150s LegacyRepository("custom", "https://example.com/simple", config=poetry.config) 150s ) 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][1]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.with_credentials() 150s exporter.export( 150s "requirements.txt", 150s tmp_path, 150s "requirements.txt", 150s ) 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected = f"""\ 150s --extra-index-url https://foo:bar@example.com/simple 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected 150s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 150s E 150s E Skipping 72 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:2153: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s __ test_exporter_exports_requirements_txt_with_dev_extras[2.1-True-expected0] __ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem8') 150s poetry = , dev = True 150s expected = ['bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'baz==1.2.3 ; python_ve...python_version == "2.7"', 'foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 150s lock_version = '2.1' 150s 150s @pytest.mark.parametrize( 150s ["dev", "expected"], 150s [ 150s ( 150s True, 150s [ 150s f"bar==1.2.2 ; {MARKER_PY}", 150s f"baz==1.2.3 ; {MARKER_PY}", 150s f"foo==1.2.1 ; {MARKER_PY}", 150s ], 150s ), 150s ( 150s False, 150s [ 150s f"bar==1.2.2 ; {MARKER_PY}", 150s f"foo==1.2.1 ; {MARKER_PY}", 150s ], 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_requirements_txt_with_dev_extras( 150s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 150s ) -> None: 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.1", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s { 150s "name": "bar", 150s "version": "1.2.2", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": { 150s "baz": { 150s "version": ">=0.1.0", 150s "optional": True, 150s "markers": "extra == 'baz'", 150s } 150s }, 150s "extras": {"baz": ["baz (>=0.1.0)"]}, 150s }, 150s { 150s "name": "baz", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": {"foo": [], "bar": [], "baz": []}, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][2]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"baz"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s if dev: 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s > assert content == "\n".join(expected) + "\n" 150s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 150s E 150s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E - baz==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 150s E 150s E ...Full output truncated (6 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:1880: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s ________ test_exporter_exports_requirements_txt_to_standard_output[1.1] ________ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem16') 150s poetry = , lock_version = '1.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_requirements_txt_to_standard_output( 150s tmp_path: Path, poetry: Poetry, lock_version: str 150s ) -> None: 150s lock_data = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": {"foo": [], "bar": []}, 150s }, 150s } 150s fix_lock_data(lock_data) 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry) 150s 150s exporter = Exporter(poetry, NullIO()) 150s io = BufferedIO() 150s exporter.export("requirements.txt", tmp_path, io) 150s 150s expected = f"""\ 150s bar==4.5.6 ; {MARKER_PY} 150s foo==1.2.3 ; {MARKER_PY} 150s """ 150s 150s > assert io.fetch_output() == expected 150s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 150s E 150s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 150s E 150s E ...Full output truncated (2 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:2195: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _ test_exporter_exports_requirements_txt_with_dev_extras[2.1-False-expected1] __ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem9') 150s poetry = , dev = False 150s expected = ['bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 150s lock_version = '2.1' 150s 150s @pytest.mark.parametrize( 150s ["dev", "expected"], 150s [ 150s ( 150s True, 150s [ 150s f"bar==1.2.2 ; {MARKER_PY}", 150s f"baz==1.2.3 ; {MARKER_PY}", 150s f"foo==1.2.1 ; {MARKER_PY}", 150s ], 150s ), 150s ( 150s False, 150s [ 150s f"bar==1.2.2 ; {MARKER_PY}", 150s f"foo==1.2.1 ; {MARKER_PY}", 150s ], 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_requirements_txt_with_dev_extras( 150s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 150s ) -> None: 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.1", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s { 150s "name": "bar", 150s "version": "1.2.2", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": { 150s "baz": { 150s "version": ">=0.1.0", 150s "optional": True, 150s "markers": "extra == 'baz'", 150s } 150s }, 150s "extras": {"baz": ["baz (>=0.1.0)"]}, 150s }, 150s { 150s "name": "baz", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": {"foo": [], "bar": [], "baz": []}, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][2]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"baz"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s if dev: 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s > assert content == "\n".join(expected) + "\n" 150s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 150s E 150s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E - foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 150s E 150s E ...Full output truncated (2 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:1880: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s ________ test_exporter_exports_requirements_txt_to_standard_output[2.1] ________ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem17') 150s poetry = , lock_version = '2.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_requirements_txt_to_standard_output( 150s tmp_path: Path, poetry: Poetry, lock_version: str 150s ) -> None: 150s lock_data = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": {"foo": [], "bar": []}, 150s }, 150s } 150s fix_lock_data(lock_data) 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry) 150s 150s exporter = Exporter(poetry, NullIO()) 150s io = BufferedIO() 150s exporter.export("requirements.txt", tmp_path, io) 150s 150s expected = f"""\ 150s bar==4.5.6 ; {MARKER_PY} 150s foo==1.2.3 ; {MARKER_PY} 150s """ 150s 150s > assert io.fetch_output() == expected 150s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 150s E 150s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 150s E 150s E ...Full output truncated (2 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:2195: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____________ test_exporter_doesnt_confuse_repeated_packages[1.1] ______________ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_doesnt_confuse_r0') 150s poetry = , lock_version = '1.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_doesnt_confuse_repeated_packages( 150s tmp_path: Path, poetry: Poetry, lock_version: str 150s ) -> None: 150s # Testcase derived from . 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "celery", 150s "version": "5.1.2", 150s "optional": False, 150s "python-versions": "<3.7", 150s "dependencies": { 150s "click": ">=7.0,<8.0", 150s "click-didyoumean": ">=0.0.3", 150s "click-plugins": ">=1.1.1", 150s }, 150s }, 150s { 150s "name": "celery", 150s "version": "5.2.3", 150s "optional": False, 150s "python-versions": ">=3.7", 150s "dependencies": { 150s "click": ">=8.0.3,<9.0", 150s "click-didyoumean": ">=0.0.3", 150s "click-plugins": ">=1.1.1", 150s }, 150s }, 150s { 150s "name": "click", 150s "version": "7.1.2", 150s "optional": False, 150s "python-versions": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", 150s }, 150s { 150s "name": "click", 150s "version": "8.0.3", 150s "optional": False, 150s "python-versions": ">=3.6", 150s "dependencies": {}, 150s }, 150s { 150s "name": "click-didyoumean", 150s "version": "0.0.3", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": {"click": "*"}, 150s }, 150s { 150s "name": "click-didyoumean", 150s "version": "0.3.0", 150s "optional": False, 150s "python-versions": ">=3.6.2,<4.0.0", 150s "dependencies": {"click": ">=7"}, 150s }, 150s { 150s "name": "click-plugins", 150s "version": "1.1.1", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": {"click": ">=4.0"}, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "^3.6", 150s "content-hash": ( 150s "832b13a88e5020c27cbcd95faa577bf0dbf054a65c023b45dc9442b640d414e6" 150s ), 150s "files": { 150s "celery": [], 150s "click-didyoumean": [], 150s "click-plugins": [], 150s "click": [], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["markers"] = "python_version < '3.7'" 150s lock_data["package"][1]["markers"] = "python_version >= '3.7'" 150s lock_data["package"][2]["markers"] = "python_version < '3.7'" 150s lock_data["package"][3]["markers"] = "python_version >= '3.7'" 150s lock_data["package"][4]["markers"] = "python_full_version < '3.6.2'" 150s lock_data["package"][5]["markers"] = "python_full_version >= '3.6.2'" 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s root = poetry.package.with_dependency_groups([], only=True) 150s root.python_versions = "^3.6" 150s root.add_dependency( 150s Factory.create_dependency( 150s name="celery", constraint={"version": "5.1.2", "python": "<3.7"} 150s ) 150s ) 150s root.add_dependency( 150s Factory.create_dependency( 150s name="celery", constraint={"version": "5.2.3", "python": ">=3.7"} 150s ) 150s ) 150s poetry._package = root 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s io = BufferedIO() 150s exporter.export("requirements.txt", tmp_path, io) 150s 150s expected = f"""\ 150s celery==5.1.2 ; {MARKER_PY36_ONLY} 150s celery==5.2.3 ; {MARKER_PY37} 150s click-didyoumean==0.0.3 ; {MARKER_PY36_PY362} 150s click-didyoumean==0.3.0 ; {MARKER_PY362_PY40} 150s click-plugins==1.1.1 ; {MARKER_PY36} 150s click==7.1.2 ; {MARKER_PY36_ONLY} 150s click==8.0.3 ; {MARKER_PY37} 150s """ 150s 150s > assert io.fetch_output() == expected 150s E assert 'celery==5.1....ion < "4.0"\n' == 'celery==5.1....ion < "4.0"\n' 150s E 150s E Skipping 130 identical leading characters in diff, use -v to show 150s E Skipping 256 identical trailing characters in diff, use -v to show 150s E - ; python_version >= "3.6" and python_full_version < "3.6.2" 150s E + ; python_full_version < "3.6.2" and python_version == "3.6" 150s E click-d 150s 150s tests/test_exporter.py:2314: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecateE: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest.UGvsHB/autopkgtest_tmp/build; python3.13 -m pytest tests 150s pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p 3.13 returned exit code 13 150s make: *** [/tmp/aP4NlDUFbS/run:4: pybuild-autopkgtest] Error 25 150s pybuild-autopkgtest: error: /tmp/aP4NlDUFbS/run pybuild-autopkgtest returned exit code 2 150s d and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _ test_exporter_omits_and_includes_extras_for_txt_formats[1.1-constraints.txt-expected0] _ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_omits_and_includ0') 150s poetry = 150s fmt = 'constraints.txt' 150s expected = ['bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'baz==7.8.9 ; python_ve...python_version == "2.7"', 'foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 150s lock_version = '1.1' 150s 150s @pytest.mark.parametrize( 150s ["fmt", "expected"], 150s [ 150s ( 150s "constraints.txt", 150s [ 150s f"bar==4.5.6 ; {MARKER_PY}", 150s f"baz==7.8.9 ; {MARKER_PY}", 150s f"foo==1.2.3 ; {MARKER_PY}", 150s ], 150s ), 150s ( 150s "requirements.txt", 150s [ 150s f"bar==4.5.6 ; {MARKER_PY}", 150s f"bar[baz]==4.5.6 ; {MARKER_PY}", 150s f"baz==7.8.9 ; {MARKER_PY}", 150s f"foo==1.2.3 ; {MARKER_PY}", 150s ], 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_omits_and_includes_extras_for_txt_formats( 150s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 150s ) -> None: 150s lock_data = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": { 150s "bar": { 150s "extras": ["baz"], 150s "version": ">=0.1.0", 150s } 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": { 150s "baz": { 150s "version": ">=0.1.0", 150s "optional": True, 150s "markers": "extra == 'baz'", 150s } 150s }, 150s "extras": {"baz": ["baz (>=0.1.0)"]}, 150s }, 150s { 150s "name": "baz", 150s "version": "7.8.9", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": {"foo": [], "bar": [], "baz": []}, 150s }, 150s } 150s fix_lock_data(lock_data) 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.export(fmt, tmp_path, "exported.txt") 150s 150s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s # It does not matter whether packages are exported with extras or not 150s # because all dependencies are listed explicitly. 150s if lock_version == "2.1": 150s expected = [req for req in expected if not req.startswith("bar[baz]")] 150s > assert content == "\n".join(expected) + "\n" 150s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 150s E 150s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 150s E 150s E ...Full output truncated (6 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:2703: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _ test_exporter_omits_and_includes_extras_for_txt_formats[1.1-requirements.txt-expected1] _ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_omits_and_includ1') 150s poetry = 150s fmt = 'requirements.txt' 150s expected = ['bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'bar[baz]==4.5.6 ; pyth...python_version == "2.7"', 'foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 150s lock_version = '1.1' 150s 150s @pytest.mark.parametrize( 150s ["fmt", "expected"], 150s [ 150s ( 150s "constraints.txt", 150s [ 150s f"bar==4.5.6 ; {MARKER_PY}", 150s f"baz==7.8.9 ; {MARKER_PY}", 150s f"foo==1.2.3 ; {MARKER_PY}", 150s ], 150s ), 150s ( 150s "requirements.txt", 150s [ 150s f"bar==4.5.6 ; {MARKER_PY}", 150s f"bar[baz]==4.5.6 ; {MARKER_PY}", 150s f"baz==7.8.9 ; {MARKER_PY}", 150s f"foo==1.2.3 ; {MARKER_PY}", 150s ], 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_omits_and_includes_extras_for_txt_formats( 150s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 150s ) -> None: 150s lock_data = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": { 150s "bar": { 150s "extras": ["baz"], 150s "version": ">=0.1.0", 150s } 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": { 150s "baz": { 150s "version": ">=0.1.0", 150s "optional": True, 150s "markers": "extra == 'baz'", 150s } 150s }, 150s "extras": {"baz": ["baz (>=0.1.0)"]}, 150s }, 150s { 150s "name": "baz", 150s "version": "7.8.9", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": {"foo": [], "bar": [], "baz": []}, 150s }, 150s } 150s fix_lock_data(lock_data) 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.export(fmt, tmp_path, "exported.txt") 150s 150s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s # It does not matter whether packages are exported with extras or not 150s # because all dependencies are listed explicitly. 150s if lock_version == "2.1": 150s expected = [req for req in expected if not req.startswith("bar[baz]")] 150s > assert content == "\n".join(expected) + "\n" 150s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 150s E 150s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E - bar[baz]==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 150s E 150s E ...Full output truncated (10 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:2703: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _ test_exporter_omits_and_includes_extras_for_txt_formats[2.1-constraints.txt-expected0] _ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_omits_and_includ2') 150s poetry = 150s fmt = 'constraints.txt' 150s expected = ['bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'baz==7.8.9 ; python_ve...python_version == "2.7"', 'foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 150s lock_version = '2.1' 150s 150s @pytest.mark.parametrize( 150s ["fmt", "expected"], 150s [ 150s ( 150s "constraints.txt", 150s [ 150s f"bar==4.5.6 ; {MARKER_PY}", 150s f"baz==7.8.9 ; {MARKER_PY}", 150s f"foo==1.2.3 ; {MARKER_PY}", 150s ], 150s ), 150s ( 150s "requirements.txt", 150s [ 150s f"bar==4.5.6 ; {MARKER_PY}", 150s f"bar[baz]==4.5.6 ; {MARKER_PY}", 150s f"baz==7.8.9 ; {MARKER_PY}", 150s f"foo==1.2.3 ; {MARKER_PY}", 150s ], 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_omits_and_includes_extras_for_txt_formats( 150s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 150s ) -> None: 150s lock_data = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": { 150s "bar": { 150s "extras": ["baz"], 150s "version": ">=0.1.0", 150s } 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": { 150s "baz": { 150s "version": ">=0.1.0", 150s "optional": True, 150s "markers": "extra == 'baz'", 150s } 150s }, 150s "extras": {"baz": ["baz (>=0.1.0)"]}, 150s }, 150s { 150s "name": "baz", 150s "version": "7.8.9", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": {"foo": [], "bar": [], "baz": []}, 150s }, 150s } 150s fix_lock_data(lock_data) 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.export(fmt, tmp_path, "exported.txt") 150s 150s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s # It does not matter whether packages are exported with extras or not 150s # because all dependencies are listed explicitly. 150s if lock_version == "2.1": 150s expected = [req for req in expected if not req.startswith("bar[baz]")] 150s > assert content == "\n".join(expected) + "\n" 150s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 150s E 150s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 150s E 150s E ...Full output truncated (6 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:2703: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _ test_exporter_omits_and_includes_extras_for_txt_formats[2.1-requirements.txt-expected1] _ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_omits_and_includ3') 150s poetry = 150s fmt = 'requirements.txt' 150s expected = ['bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'baz==7.8.9 ; python_ve...python_version == "2.7"', 'foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 150s lock_version = '2.1' 150s 150s @pytest.mark.parametrize( 150s ["fmt", "expected"], 150s [ 150s ( 150s "constraints.txt", 150s [ 150s f"bar==4.5.6 ; {MARKER_PY}", 150s f"baz==7.8.9 ; {MARKER_PY}", 150s f"foo==1.2.3 ; {MARKER_PY}", 150s ], 150s ), 150s ( 150s "requirements.txt", 150s [ 150s f"bar==4.5.6 ; {MARKER_PY}", 150s f"bar[baz]==4.5.6 ; {MARKER_PY}", 150s f"baz==7.8.9 ; {MARKER_PY}", 150s f"foo==1.2.3 ; {MARKER_PY}", 150s ], 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_omits_and_includes_extras_for_txt_formats( 150s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 150s ) -> None: 150s lock_data = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": { 150s "bar": { 150s "extras": ["baz"], 150s "version": ">=0.1.0", 150s } 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": { 150s "baz": { 150s "version": ">=0.1.0", 150s "optional": True, 150s "markers": "extra == 'baz'", 150s } 150s }, 150s "extras": {"baz": ["baz (>=0.1.0)"]}, 150s }, 150s { 150s "name": "baz", 150s "version": "7.8.9", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": {"foo": [], "bar": [], "baz": []}, 150s }, 150s } 150s fix_lock_data(lock_data) 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.export(fmt, tmp_path, "exported.txt") 150s 150s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s # It does not matter whether packages are exported with extras or not 150s # because all dependencies are listed explicitly. 150s if lock_version == "2.1": 150s expected = [req for req in expected if not req.startswith("bar[baz]")] 150s > assert content == "\n".join(expected) + "\n" 150s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 150s E 150s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 150s E 150s E ...Full output truncated (6 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:2703: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _ test_exporter_prints_warning_for_constraints_txt_with_editable_packages[1.1] _ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_prints_warning_f0') 150s poetry = , lock_version = '1.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_prints_warning_for_constraints_txt_with_editable_packages( 150s tmp_path: Path, poetry: Poetry, lock_version: str 150s ) -> None: 150s lock_data = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "git", 150s "url": "https://github.com/foo/foo.git", 150s "reference": "123456", 150s }, 150s "develop": True, 150s }, 150s { 150s "name": "bar", 150s "version": "7.8.9", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s { 150s "name": "baz", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "directory", 150s "url": "sample_project", 150s "reference": "", 150s }, 150s "develop": True, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": {"foo": [], "bar": [], "baz": []}, 150s }, 150s } 150s fix_lock_data(lock_data) 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry) 150s 150s io = BufferedIO() 150s exporter = Exporter(poetry, io) 150s exporter.export("constraints.txt", tmp_path, "constraints.txt") 150s 150s expected_error_out = ( 150s "Warning: foo is locked in develop (editable) mode, which is " 150s "incompatible with the constraints.txt format.\n" 150s "Warning: baz is locked in develop (editable) mode, which is " 150s "incompatible with the constraints.txt format.\n" 150s ) 150s 150s assert io.fetch_error() == expected_error_out 150s 150s with (tmp_path / "constraints.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s > assert content == f"bar==7.8.9 ; {MARKER_PY}\n" 150s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 150s E 150s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s 150s tests/test_exporter.py:2770: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _ test_exporter_prints_warning_for_constraints_txt_with_editable_packages[2.1] _ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_prints_warning_f0') 150s poetry = , lock_version = '2.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_prints_warning_for_constraints_txt_with_editable_packages( 150s tmp_path: Path, poetry: Poetry, lock_version: str 150s ) -> None: 150s lock_data = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "git", 150s "url": "https://github.com/foo/foo.git", 150s "reference": "123456", 150s }, 150s "develop": True, 150s }, 150s { 150s "name": "bar", 150s "version": "7.8.9", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s { 150s "name": "baz", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "directory", 150s "url": "sample_project", 150s "reference": "", 150s }, 150s "develop": True, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": {"foo": [], "bar": [], "baz": []}, 150s }, 150s } 150s fix_lock_data(lock_data) 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry) 150s 150s io = BufferedIO() 150s exporter = Exporter(poetry, io) 150s exporter.export("constraints.txt", tmp_path, "constraints.txt") 150s 150s expected_error_out = ( 150s "Warning: foo is locked in develop (editable) mode, which is " 150s "incompatible with the constraints.txt format.\n" 150s "Warning: baz is locked in develop (editable) mode, which is " 150s "incompatible with the constraints.txt format.\n" 150s ) 150s 150s assert io.fetch_error() == expected_error_out 150s 150s with (tmp_path / "constraints.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s > assert content == f"bar==7.8.9 ; {MARKER_PY}\n" 150s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 150s E 150s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s 150s tests/test_exporter.py:2770: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _________ test_exporter_exports_extra_index_url_and_trusted_host[1.1] __________ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_extra_in0') 150s poetry = , lock_version = '1.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_extra_index_url_and_trusted_host( 150s tmp_path: Path, poetry: Poetry, lock_version: str 150s ) -> None: 150s poetry.pool.add_repository( 150s LegacyRepository( 150s "custom", 150s "http://example.com/simple", 150s ), 150s priority=Priority.EXPLICIT, 150s ) 150s lock_data = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": {"bar": "*"}, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "http://example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": {"foo": [], "bar": []}, 150s }, 150s } 150s fix_lock_data(lock_data) 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected = f"""\ 150s --trusted-host example.com 150s --extra-index-url http://example.com/simple 150s 150s bar==4.5.6 ; {MARKER_PY} 150s foo==1.2.3 ; {MARKER_PY} 150s """ 150s > assert content == expected 150s E assert '--trusted-ho...ion < "4.0"\n' == '--trusted-ho...on == "2.7"\n' 150s E 150s E Skipping 90 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 150s E 150s E ...Full output truncated (3 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:2965: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _________ test_exporter_exports_extra_index_url_and_trusted_host[2.1] __________ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_extra_in1') 150s poetry = , lock_version = '2.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_exports_extra_index_url_and_trusted_host( 150s tmp_path: Path, poetry: Poetry, lock_version: str 150s ) -> None: 150s poetry.pool.add_repository( 150s LegacyRepository( 150s "custom", 150s "http://example.com/simple", 150s ), 150s priority=Priority.EXPLICIT, 150s ) 150s lock_data = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": {"bar": "*"}, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "http://example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": {"foo": [], "bar": []}, 150s }, 150s } 150s fix_lock_data(lock_data) 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected = f"""\ 150s --trusted-host example.com 150s --extra-index-url http://example.com/simple 150s 150s bar==4.5.6 ; {MARKER_PY} 150s foo==1.2.3 ; {MARKER_PY} 150s """ 150s > assert content == expected 150s E assert '--trusted-ho...ion < "4.0"\n' == '--trusted-ho...on == "2.7"\n' 150s E 150s E Skipping 90 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 150s E 150s E ...Full output truncated (3 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:2965: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____________ test_exporter_index_urls[1.1-priorities0-expected0] ______________ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_1_1_p0') 150s poetry = 150s priorities = [('custom-a', ), ('custom-b', )] 150s expected = ('a', 'b'), lock_version = '1.1' 150s 150s @pytest.mark.parametrize( 150s ("priorities", "expected"), 150s [ 150s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 150s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 150s ( 150s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 150s ("a", "b"), 150s ), 150s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 150s ( 150s [ 150s ("PyPI", Priority.PRIMARY), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("PyPI", Priority.EXPLICIT), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ("PyPI", Priority.SUPPLEMENTAL), 150s ], 150s ("", "a", "b"), 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_index_urls( 150s tmp_path: Path, 150s poetry: Poetry, 150s priorities: list[tuple[str, Priority]], 150s expected: tuple[str, ...], 150s lock_version: str, 150s ) -> None: 150s pypi = poetry.pool.repository("PyPI") 150s poetry.pool.remove_repository("PyPI") 150s for name, prio in priorities: 150s if name.lower() == "pypi": 150s repo = pypi 150s else: 150s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 150s poetry.pool.add_repository(repo, priority=prio) 150s 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected_urls = [ 150s f"--extra-index-url https://{name[-1]}.example.com/simple" 150s for name in expected[1:] 150s ] 150s if expected[0]: 150s expected_urls = [ 150s f"--index-url https://{expected[0]}.example.com/simple", 150s *expected_urls, 150s ] 150s url_string = "\n".join(expected_urls) 150s 150s expected_content = f"""\ 150s {url_string} 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected_content 150s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 150s E 150s E Skipping 107 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:3175: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____________ test_exporter_index_urls[1.1-priorities2-expected2] ______________ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_1_1_p0') 150s poetry = 150s priorities = [('custom-b', ), ('custom-a', )] 150s expected = ('a', 'b'), lock_version = '1.1' 150s 150s @pytest.mark.parametrize( 150s ("priorities", "expected"), 150s [ 150s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 150s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 150s ( 150s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 150s ("a", "b"), 150s ), 150s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 150s ( 150s [ 150s ("PyPI", Priority.PRIMARY), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("PyPI", Priority.EXPLICIT), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ("PyPI", Priority.SUPPLEMENTAL), 150s ], 150s ("", "a", "b"), 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_index_urls( 150s tmp_path: Path, 150s poetry: Poetry, 150s priorities: list[tuple[str, Priority]], 150s expected: tuple[str, ...], 150s lock_version: str, 150s ) -> None: 150s pypi = poetry.pool.repository("PyPI") 150s poetry.pool.remove_repository("PyPI") 150s for name, prio in priorities: 150s if name.lower() == "pypi": 150s repo = pypi 150s else: 150s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 150s poetry.pool.add_repository(repo, priority=prio) 150s 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected_urls = [ 150s f"--extra-index-url https://{name[-1]}.example.com/simple" 150s for name in expected[1:] 150s ] 150s if expected[0]: 150s expected_urls = [ 150s f"--index-url https://{expected[0]}.example.com/simple", 150s *expected_urls, 150s ] 150s url_string = "\n".join(expected_urls) 150s 150s expected_content = f"""\ 150s {url_string} 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected_content 150s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 150s E 150s E Skipping 107 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:3175: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____________ test_exporter_index_urls[1.1-priorities1-expected1] ______________ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_1_1_p1') 150s poetry = 150s priorities = [('custom-b', ), ('custom-a', )] 150s expected = ('b', 'a'), lock_version = '1.1' 150s 150s @pytest.mark.parametrize( 150s ("priorities", "expected"), 150s [ 150s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 150s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 150s ( 150s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 150s ("a", "b"), 150s ), 150s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 150s ( 150s [ 150s ("PyPI", Priority.PRIMARY), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("PyPI", Priority.EXPLICIT), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ("PyPI", Priority.SUPPLEMENTAL), 150s ], 150s ("", "a", "b"), 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_index_urls( 150s tmp_path: Path, 150s poetry: Poetry, 150s priorities: list[tuple[str, Priority]], 150s expected: tuple[str, ...], 150s lock_version: str, 150s ) -> None: 150s pypi = poetry.pool.repository("PyPI") 150s poetry.pool.remove_repository("PyPI") 150s for name, prio in priorities: 150s if name.lower() == "pypi": 150s repo = pypi 150s else: 150s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 150s poetry.pool.add_repository(repo, priority=prio) 150s 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected_urls = [ 150s f"--extra-index-url https://{name[-1]}.example.com/simple" 150s for name in expected[1:] 150s ] 150s if expected[0]: 150s expected_urls = [ 150s f"--index-url https://{expected[0]}.example.com/simple", 150s *expected_urls, 150s ] 150s url_string = "\n".join(expected_urls) 150s 150s expected_content = f"""\ 150s {url_string} 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected_content 150s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 150s E 150s E Skipping 107 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:3175: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____________ test_exporter_index_urls[1.1-priorities3-expected3] ______________ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_1_1_p1') 150s poetry = 150s priorities = [('custom-b', ), ('custom-a', )] 150s expected = ('a', 'b'), lock_version = '1.1' 150s 150s @pytest.mark.parametrize( 150s ("priorities", "expected"), 150s [ 150s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 150s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 150s ( 150s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 150s ("a", "b"), 150s ), 150s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 150s ( 150s [ 150s ("PyPI", Priority.PRIMARY), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("PyPI", Priority.EXPLICIT), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ("PyPI", Priority.SUPPLEMENTAL), 150s ], 150s ("", "a", "b"), 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_index_urls( 150s tmp_path: Path, 150s poetry: Poetry, 150s priorities: list[tuple[str, Priority]], 150s expected: tuple[str, ...], 150s lock_version: str, 150s ) -> None: 150s pypi = poetry.pool.repository("PyPI") 150s poetry.pool.remove_repository("PyPI") 150s for name, prio in priorities: 150s if name.lower() == "pypi": 150s repo = pypi 150s else: 150s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 150s poetry.pool.add_repository(repo, priority=prio) 150s 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected_urls = [ 150s f"--extra-index-url https://{name[-1]}.example.com/simple" 150s for name in expected[1:] 150s ] 150s if expected[0]: 150s expected_urls = [ 150s f"--index-url https://{expected[0]}.example.com/simple", 150s *expected_urls, 150s ] 150s url_string = "\n".join(expected_urls) 150s 150s expected_content = f"""\ 150s {url_string} 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected_content 150s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 150s E 150s E Skipping 107 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:3175: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____________ test_exporter_index_urls[1.1-priorities6-expected6] ______________ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_1_1_p2') 150s poetry = 150s priorities = [('custom-a', ), ('custom-b', ), ('PyPI', )] 150s expected = ('', 'a', 'b'), lock_version = '1.1' 150s 150s @pytest.mark.parametrize( 150s ("priorities", "expected"), 150s [ 150s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 150s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 150s ( 150s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 150s ("a", "b"), 150s ), 150s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 150s ( 150s [ 150s ("PyPI", Priority.PRIMARY), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("PyPI", Priority.EXPLICIT), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ("PyPI", Priority.SUPPLEMENTAL), 150s ], 150s ("", "a", "b"), 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_index_urls( 150s tmp_path: Path, 150s poetry: Poetry, 150s priorities: list[tuple[str, Priority]], 150s expected: tuple[str, ...], 150s lock_version: str, 150s ) -> None: 150s pypi = poetry.pool.repository("PyPI") 150s poetry.pool.remove_repository("PyPI") 150s for name, prio in priorities: 150s if name.lower() == "pypi": 150s repo = pypi 150s else: 150s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 150s poetry.pool.add_repository(repo, priority=prio) 150s 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected_urls = [ 150s f"--extra-index-url https://{name[-1]}.example.com/simple" 150s for name in expected[1:] 150s ] 150s if expected[0]: 150s expected_urls = [ 150s f"--index-url https://{expected[0]}.example.com/simple", 150s *expected_urls, 150s ] 150s url_string = "\n".join(expected_urls) 150s 150s expected_content = f"""\ 150s {url_string} 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected_content 150s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 150s E 150s E Skipping 113 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:3175: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____________ test_exporter_index_urls[1.1-priorities4-expected4] ______________ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_1_1_p2') 150s poetry = 150s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 150s expected = ('', 'a', 'b'), lock_version = '1.1' 150s 150s @pytest.mark.parametrize( 150s ("priorities", "expected"), 150s [ 150s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 150s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 150s ( 150s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 150s ("a", "b"), 150s ), 150s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 150s ( 150s [ 150s ("PyPI", Priority.PRIMARY), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("PyPI", Priority.EXPLICIT), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ("PyPI", Priority.SUPPLEMENTAL), 150s ], 150s ("", "a", "b"), 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_index_urls( 150s tmp_path: Path, 150s poetry: Poetry, 150s priorities: list[tuple[str, Priority]], 150s expected: tuple[str, ...], 150s lock_version: str, 150s ) -> None: 150s pypi = poetry.pool.repository("PyPI") 150s poetry.pool.remove_repository("PyPI") 150s for name, prio in priorities: 150s if name.lower() == "pypi": 150s repo = pypi 150s else: 150s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 150s poetry.pool.add_repository(repo, priority=prio) 150s 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected_urls = [ 150s f"--extra-index-url https://{name[-1]}.example.com/simple" 150s for name in expected[1:] 150s ] 150s if expected[0]: 150s expected_urls = [ 150s f"--index-url https://{expected[0]}.example.com/simple", 150s *expected_urls, 150s ] 150s url_string = "\n".join(expected_urls) 150s 150s expected_content = f"""\ 150s {url_string} 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected_content 150s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 150s E 150s E Skipping 113 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:3175: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____________ test_exporter_index_urls[2.1-priorities0-expected0] ______________ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_2_1_p0') 150s poetry = 150s priorities = [('custom-a', ), ('custom-b', )] 150s expected = ('a', 'b'), lock_version = '2.1' 150s 150s @pytest.mark.parametrize( 150s ("priorities", "expected"), 150s [ 150s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 150s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 150s ( 150s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 150s ("a", "b"), 150s ), 150s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 150s ( 150s [ 150s ("PyPI", Priority.PRIMARY), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("PyPI", Priority.EXPLICIT), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ("PyPI", Priority.SUPPLEMENTAL), 150s ], 150s ("", "a", "b"), 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_index_urls( 150s tmp_path: Path, 150s poetry: Poetry, 150s priorities: list[tuple[str, Priority]], 150s expected: tuple[str, ...], 150s lock_version: str, 150s ) -> None: 150s pypi = poetry.pool.repository("PyPI") 150s poetry.pool.remove_repository("PyPI") 150s for name, prio in priorities: 150s if name.lower() == "pypi": 150s repo = pypi 150s else: 150s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 150s poetry.pool.add_repository(repo, priority=prio) 150s 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected_urls = [ 150s f"--extra-index-url https://{name[-1]}.example.com/simple" 150s for name in expected[1:] 150s ] 150s if expected[0]: 150s expected_urls = [ 150s f"--index-url https://{expected[0]}.example.com/simple", 150s *expected_urls, 150s ] 150s url_string = "\n".join(expected_urls) 150s 150s expected_content = f"""\ 150s {url_string} 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected_content 150s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 150s E 150s E Skipping 107 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:3175: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____________ test_exporter_index_urls[1.1-priorities5-expected5] ______________ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_1_1_p3') 150s poetry = 150s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 150s expected = ('', 'a', 'b'), lock_version = '1.1' 150s 150s @pytest.mark.parametrize( 150s ("priorities", "expected"), 150s [ 150s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 150s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 150s ( 150s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 150s ("a", "b"), 150s ), 150s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 150s ( 150s [ 150s ("PyPI", Priority.PRIMARY), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("PyPI", Priority.EXPLICIT), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ("PyPI", Priority.SUPPLEMENTAL), 150s ], 150s ("", "a", "b"), 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_index_urls( 150s tmp_path: Path, 150s poetry: Poetry, 150s priorities: list[tuple[str, Priority]], 150s expected: tuple[str, ...], 150s lock_version: str, 150s ) -> None: 150s pypi = poetry.pool.repository("PyPI") 150s poetry.pool.remove_repository("PyPI") 150s for name, prio in priorities: 150s if name.lower() == "pypi": 150s repo = pypi 150s else: 150s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 150s poetry.pool.add_repository(repo, priority=prio) 150s 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected_urls = [ 150s f"--extra-index-url https://{name[-1]}.example.com/simple" 150s for name in expected[1:] 150s ] 150s if expected[0]: 150s expected_urls = [ 150s f"--index-url https://{expected[0]}.example.com/simple", 150s *expected_urls, 150s ] 150s url_string = "\n".join(expected_urls) 150s 150s expected_content = f"""\ 150s {url_string} 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected_content 150s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 150s E 150s E Skipping 113 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:3175: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____________ test_exporter_index_urls[2.1-priorities1-expected1] ______________ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_2_1_p1') 150s poetry = 150s priorities = [('custom-b', ), ('custom-a', )] 150s expected = ('b', 'a'), lock_version = '2.1' 150s 150s @pytest.mark.parametrize( 150s ("priorities", "expected"), 150s [ 150s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 150s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 150s ( 150s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 150s ("a", "b"), 150s ), 150s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 150s ( 150s [ 150s ("PyPI", Priority.PRIMARY), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("PyPI", Priority.EXPLICIT), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ("PyPI", Priority.SUPPLEMENTAL), 150s ], 150s ("", "a", "b"), 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_index_urls( 150s tmp_path: Path, 150s poetry: Poetry, 150s priorities: list[tuple[str, Priority]], 150s expected: tuple[str, ...], 150s lock_version: str, 150s ) -> None: 150s pypi = poetry.pool.repository("PyPI") 150s poetry.pool.remove_repository("PyPI") 150s for name, prio in priorities: 150s if name.lower() == "pypi": 150s repo = pypi 150s else: 150s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 150s poetry.pool.add_repository(repo, priority=prio) 150s 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected_urls = [ 150s f"--extra-index-url https://{name[-1]}.example.com/simple" 150s for name in expected[1:] 150s ] 150s if expected[0]: 150s expected_urls = [ 150s f"--index-url https://{expected[0]}.example.com/simple", 150s *expected_urls, 150s ] 150s url_string = "\n".join(expected_urls) 150s 150s expected_content = f"""\ 150s {url_string} 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected_content 150s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 150s E 150s E Skipping 107 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:3175: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____________ test_exporter_index_urls[2.1-priorities2-expected2] ______________ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_2_1_p0') 150s poetry = 150s priorities = [('custom-b', ), ('custom-a', )] 150s expected = ('a', 'b'), lock_version = '2.1' 150s 150s @pytest.mark.parametrize( 150s ("priorities", "expected"), 150s [ 150s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 150s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 150s ( 150s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 150s ("a", "b"), 150s ), 150s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 150s ( 150s [ 150s ("PyPI", Priority.PRIMARY), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("PyPI", Priority.EXPLICIT), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ("PyPI", Priority.SUPPLEMENTAL), 150s ], 150s ("", "a", "b"), 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_index_urls( 150s tmp_path: Path, 150s poetry: Poetry, 150s priorities: list[tuple[str, Priority]], 150s expected: tuple[str, ...], 150s lock_version: str, 150s ) -> None: 150s pypi = poetry.pool.repository("PyPI") 150s poetry.pool.remove_repository("PyPI") 150s for name, prio in priorities: 150s if name.lower() == "pypi": 150s repo = pypi 150s else: 150s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 150s poetry.pool.add_repository(repo, priority=prio) 150s 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected_urls = [ 150s f"--extra-index-url https://{name[-1]}.example.com/simple" 150s for name in expected[1:] 150s ] 150s if expected[0]: 150s expected_urls = [ 150s f"--index-url https://{expected[0]}.example.com/simple", 150s *expected_urls, 150s ] 150s url_string = "\n".join(expected_urls) 150s 150s expected_content = f"""\ 150s {url_string} 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected_content 150s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 150s E 150s E Skipping 107 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:3175: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____________ test_exporter_index_urls[2.1-priorities3-expected3] ______________ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_2_1_p2') 150s poetry = 150s priorities = [('custom-b', ), ('custom-a', )] 150s expected = ('a', 'b'), lock_version = '2.1' 150s 150s @pytest.mark.parametrize( 150s ("priorities", "expected"), 150s [ 150s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 150s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 150s ( 150s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 150s ("a", "b"), 150s ), 150s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 150s ( 150s [ 150s ("PyPI", Priority.PRIMARY), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("PyPI", Priority.EXPLICIT), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ("PyPI", Priority.SUPPLEMENTAL), 150s ], 150s ("", "a", "b"), 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_index_urls( 150s tmp_path: Path, 150s poetry: Poetry, 150s priorities: list[tuple[str, Priority]], 150s expected: tuple[str, ...], 150s lock_version: str, 150s ) -> None: 150s pypi = poetry.pool.repository("PyPI") 150s poetry.pool.remove_repository("PyPI") 150s for name, prio in priorities: 150s if name.lower() == "pypi": 150s repo = pypi 150s else: 150s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 150s poetry.pool.add_repository(repo, priority=prio) 150s 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected_urls = [ 150s f"--extra-index-url https://{name[-1]}.example.com/simple" 150s for name in expected[1:] 150s ] 150s if expected[0]: 150s expected_urls = [ 150s f"--index-url https://{expected[0]}.example.com/simple", 150s *expected_urls, 150s ] 150s url_string = "\n".join(expected_urls) 150s 150s expected_content = f"""\ 150s {url_string} 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected_content 150s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 150s E 150s E Skipping 107 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:3175: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____________ test_exporter_index_urls[2.1-priorities4-expected4] ______________ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_2_1_p1') 150s poetry = 150s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 150s expected = ('', 'a', 'b'), lock_version = '2.1' 150s 150s @pytest.mark.parametrize( 150s ("priorities", "expected"), 150s [ 150s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 150s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 150s ( 150s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 150s ("a", "b"), 150s ), 150s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 150s ( 150s [ 150s ("PyPI", Priority.PRIMARY), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("PyPI", Priority.EXPLICIT), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ("PyPI", Priority.SUPPLEMENTAL), 150s ], 150s ("", "a", "b"), 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_index_urls( 150s tmp_path: Path, 150s poetry: Poetry, 150s priorities: list[tuple[str, Priority]], 150s expected: tuple[str, ...], 150s lock_version: str, 150s ) -> None: 150s pypi = poetry.pool.repository("PyPI") 150s poetry.pool.remove_repository("PyPI") 150s for name, prio in priorities: 150s if name.lower() == "pypi": 150s repo = pypi 150s else: 150s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 150s poetry.pool.add_repository(repo, priority=prio) 150s 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected_urls = [ 150s f"--extra-index-url https://{name[-1]}.example.com/simple" 150s for name in expected[1:] 150s ] 150s if expected[0]: 150s expected_urls = [ 150s f"--index-url https://{expected[0]}.example.com/simple", 150s *expected_urls, 150s ] 150s url_string = "\n".join(expected_urls) 150s 150s expected_content = f"""\ 150s {url_string} 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected_content 150s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 150s E 150s E Skipping 113 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:3175: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____________ test_exporter_index_urls[2.1-priorities5-expected5] ______________ 150s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_2_1_p3') 150s poetry = 150s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 150s expected = ('', 'a', 'b'), lock_version = '2.1' 150s 150s @pytest.mark.parametrize( 150s ("priorities", "expected"), 150s [ 150s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 150s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 150s ( 150s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 150s ("a", "b"), 150s ), 150s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 150s ( 150s [ 150s ("PyPI", Priority.PRIMARY), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("PyPI", Priority.EXPLICIT), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ("PyPI", Priority.SUPPLEMENTAL), 150s ], 150s ("", "a", "b"), 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_index_urls( 150s tmp_path: Path, 150s poetry: Poetry, 150s priorities: list[tuple[str, Priority]], 150s expected: tuple[str, ...], 150s lock_version: str, 150s ) -> None: 150s pypi = poetry.pool.repository("PyPI") 150s poetry.pool.remove_repository("PyPI") 150s for name, prio in priorities: 150s if name.lower() == "pypi": 150s repo = pypi 150s else: 150s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 150s poetry.pool.add_repository(repo, priority=prio) 150s 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected_urls = [ 150s f"--extra-index-url https://{name[-1]}.example.com/simple" 150s for name in expected[1:] 150s ] 150s if expected[0]: 150s expected_urls = [ 150s f"--index-url https://{expected[0]}.example.com/simple", 150s *expected_urls, 150s ] 150s url_string = "\n".join(expected_urls) 150s 150s expected_content = f"""\ 150s {url_string} 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected_content 150s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 150s E 150s E Skipping 113 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:3175: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _____________ test_exporter_index_urls[2.1-priorities6-expected6] ______________ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_2_1_p2') 150s poetry = 150s priorities = [('custom-a', ), ('custom-b', ), ('PyPI', )] 150s expected = ('', 'a', 'b'), lock_version = '2.1' 150s 150s @pytest.mark.parametrize( 150s ("priorities", "expected"), 150s [ 150s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 150s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 150s ( 150s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 150s ("a", "b"), 150s ), 150s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 150s ( 150s [ 150s ("PyPI", Priority.PRIMARY), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("PyPI", Priority.EXPLICIT), 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ], 150s ("", "a", "b"), 150s ), 150s ( 150s [ 150s ("custom-a", Priority.PRIMARY), 150s ("custom-b", Priority.PRIMARY), 150s ("PyPI", Priority.SUPPLEMENTAL), 150s ], 150s ("", "a", "b"), 150s ), 150s ], 150s ) 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_exporter_index_urls( 150s tmp_path: Path, 150s poetry: Poetry, 150s priorities: list[tuple[str, Priority]], 150s expected: tuple[str, ...], 150s lock_version: str, 150s ) -> None: 150s pypi = poetry.pool.repository("PyPI") 150s poetry.pool.remove_repository("PyPI") 150s for name, prio in priorities: 150s if name.lower() == "pypi": 150s repo = pypi 150s else: 150s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 150s poetry.pool.add_repository(repo, priority=prio) 150s 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1.2.3", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://a.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s { 150s "name": "bar", 150s "version": "4.5.6", 150s "optional": False, 150s "python-versions": "*", 150s "source": { 150s "type": "legacy", 150s "url": "https://b.example.com/simple", 150s "reference": "", 150s }, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": { 150s "foo": [{"name": "foo.whl", "hash": "12345"}], 150s "bar": [{"name": "bar.whl", "hash": "67890"}], 150s }, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["groups"] = ["dev"] 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s set_package_requires(poetry, dev={"bar"}) 150s 150s exporter = Exporter(poetry, NullIO()) 150s exporter.only_groups([MAIN_GROUP, "dev"]) 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected_urls = [ 150s f"--extra-index-url https://{name[-1]}.example.com/simple" 150s for name in expected[1:] 150s ] 150s if expected[0]: 150s expected_urls = [ 150s f"--index-url https://{expected[0]}.example.com/simple", 150s *expected_urls, 150s ] 150s url_string = "\n".join(expected_urls) 150s 150s expected_content = f"""\ 150s {url_string} 150s 150s bar==4.5.6 ; {MARKER_PY} \\ 150s --hash=sha256:67890 150s foo==1.2.3 ; {MARKER_PY} \\ 150s --hash=sha256:12345 150s """ 150s 150s > assert content == expected_content 150s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 150s E 150s E Skipping 113 identical leading characters in diff, use -v to show 150s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 150s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 150s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 150s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 150s E --hash=sha256:67890... 150s E 150s E ...Full output truncated (5 lines hidden), use '-vv' to show 150s 150s tests/test_exporter.py:3175: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s _______________________ test_dependency_walk_error[2.1] ________________________ 150s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 150s 150s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_dependency_walk_error_2_10') 150s poetry = , lock_version = '2.1' 150s 150s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 150s def test_dependency_walk_error( 150s tmp_path: Path, poetry: Poetry, lock_version: str 150s ) -> None: 150s """ 150s With lock file version 2.1 we can export lock files 150s that resulted in a DependencyWalkerError with lower lock file versions. 150s 150s root 150s ├── foo >=0 ; python_version < "3.9" 150s ├── foo >=1 ; python_version >= "3.9" 150s ├── bar ==1 ; python_version < "3.9" 150s │ └── foo ==1 ; python_version < "3.9" 150s └── bar ==2 ; python_version >= "3.9" 150s └── foo ==2 ; python_version >= "3.9" 150s 150s Only considering the root dependency, foo 2 is a valid solution 150s for all environments. However, due to bar depending on foo, 150s foo 1 must be chosen for Python 3.8 and lower. 150s """ 150s lock_data: dict[str, Any] = { 150s "package": [ 150s { 150s "name": "foo", 150s "version": "1", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s { 150s "name": "foo", 150s "version": "2", 150s "optional": False, 150s "python-versions": "*", 150s }, 150s { 150s "name": "bar", 150s "version": "1", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": {"foo": "1"}, 150s }, 150s { 150s "name": "bar", 150s "version": "2", 150s "optional": False, 150s "python-versions": "*", 150s "dependencies": {"foo": "2"}, 150s }, 150s ], 150s "metadata": { 150s "lock-version": lock_version, 150s "python-versions": "*", 150s "content-hash": "123456789", 150s "files": {"foo": [], "bar": []}, 150s }, 150s } 150s fix_lock_data(lock_data) 150s if lock_version == "2.1": 150s lock_data["package"][0]["markers"] = "python_version < '3.9'" 150s lock_data["package"][1]["markers"] = "python_version >= '3.9'" 150s lock_data["package"][2]["markers"] = "python_version < '3.9'" 150s lock_data["package"][3]["markers"] = "python_version >= '3.9'" 150s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 150s poetry.package.python_versions = "^3.8" 150s poetry.package.add_dependency( 150s Factory.create_dependency( 150s name="foo", constraint={"version": ">=0", "python": "<3.9"} 150s ) 150s ) 150s poetry.package.add_dependency( 150s Factory.create_dependency( 150s name="foo", constraint={"version": ">=1", "python": ">=3.9"} 150s ) 150s ) 150s poetry.package.add_dependency( 150s Factory.create_dependency( 150s name="bar", constraint={"version": "1", "python": "<3.9"} 150s ) 150s ) 150s poetry.package.add_dependency( 150s Factory.create_dependency( 150s name="bar", constraint={"version": "2", "python": ">=3.9"} 150s ) 150s ) 150s 150s exporter = Exporter(poetry, NullIO()) 150s if lock_version == "1.1": 150s with pytest.raises(DependencyWalkerError): 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s return 150s 150s exporter.export("requirements.txt", tmp_path, "requirements.txt") 150s 150s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 150s content = f.read() 150s 150s expected = """\ 150s bar==1 ; python_version >= "3.8" and python_version < "3.9" 150s bar==2 ; python_version >= "3.9" and python_version < "4.0" 150s foo==1 ; python_version >= "3.8" and python_version < "3.9" 150s foo==2 ; python_version >= "3.9" and python_version < "4.0" 150s """ 150s 150s > assert content == expected 150s E assert 'bar==1 ; pyt...ion < "4.0"\n' == 'bar==1 ; pyt...ion < "4.0"\n' 150s E 150s E - bar==1 ; python_version >= "3.8" and python_version < "3.9" 150s E + bar==1 ; python_version == "3.8" 150s E bar==2 ; python_version >= "3.9" and python_version < "4.0" 150s E - foo==1 ; python_version >= "3.8" and python_version < "3.9" 150s E + foo==1 ; python_version == "3.8" 150s E foo==2 ; python_version >= "3.9" and python_version < "4.0" 150s 150s tests/test_exporter.py:3281: AssertionError 150s ------------------------------ Captured log setup ------------------------------ 150s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 150s =========================== short test summary info ============================ 150s FAILED tests/command/test_command_export.py::test_export_includes_extras_by_flag[feature_bar-bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 150s FAILED tests/command/test_command_export.py::test_export_includes_extras_by_flag[feature_bar feature_qux-bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nqux==1.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 150s FAILED tests/command/test_command_export.py::test_export_exports_requirements_txt_file_locks_if_no_lock_file 150s FAILED tests/command/test_command_export.py::test_export_exports_requirements_txt_uses_lock_file 150s FAILED tests/command/test_command_export.py::test_export_with_all_extras - as... 150s FAILED tests/command/test_command_export.py::test_export_with_all_groups - as... 150s FAILED tests/command/test_command_export.py::test_export_prints_to_stdout_by_default 150s FAILED tests/command/test_command_export.py::test_export_uses_requirements_txt_format_by_default 150s FAILED tests/command/test_command_export.py::test_export_groups[-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 150s FAILED tests/command/test_command_export.py::test_export_groups[--with dev-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 150s FAILED tests/command/test_command_export.py::test_export_groups[--with opt-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nopt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 150s FAILED tests/command/test_command_export.py::test_export_groups[--with dev,opt-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nopt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 150s FAILED tests/command/test_command_export.py::test_export_groups[--without dev-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 150s FAILED tests/command/test_command_export.py::test_export_groups[--without opt-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages[1.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[1.1] 150s FAILED tests/command/test_command_export.py::test_export_groups[--only main-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_poetry[1.1] 150s FAILED tests/command/test_command_export.py::test_export_groups[--only dev-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_poetry[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_pyinstaller[1.1] 150s FAILED tests/command/test_command_export.py::test_export_groups[--only main,dev-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_pyinstaller[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_git_packages[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages[1.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-False-lines0] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[1.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-True-lines1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-False-lines0] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_circular_root_dependency[1.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-True-lines1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_circular_root_dependency[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[1.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[1.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[1.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages[1.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[1.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages_editable[1.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_dev_packages_by_default[1.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages_editable[2.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_dev_packages_by_default[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_directory_packages[1.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[1.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_directory_packages[2.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_file_packages[1.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_optional_packages[1.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_file_packages[2.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_optional_packages[2.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_optional_packages[1.1-extras0-lines0] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages[1.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_optional_packages[2.1-extras0-lines0] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages[2.1] 150s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_git_packages[1.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_url_false[1.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[1.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_url_false[2.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[2.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[1.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_two_primary_sources[1.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[2.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_two_primary_sources[2.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[1.1-True-expected0] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[1.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[1.1-False-expected1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[2.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[2.1-True-expected0] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_to_standard_output[1.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[2.1-False-expected1] 150s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_to_standard_output[2.1] 150s FAILED tests/test_exporter.py::test_exporter_doesnt_confuse_repeated_packages[1.1] 150s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[1.1-constraints.txt-expected0] 150s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[1.1-requirements.txt-expected1] 150s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[2.1-constraints.txt-expected0] 150s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[2.1-requirements.txt-expected1] 150s FAILED tests/test_exporter.py::test_exporter_prints_warning_for_constraints_txt_with_editable_packages[1.1] 150s FAILED tests/test_exporter.py::test_exporter_prints_warning_for_constraints_txt_with_editable_packages[2.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_extra_index_url_and_trusted_host[1.1] 150s FAILED tests/test_exporter.py::test_exporter_exports_extra_index_url_and_trusted_host[2.1] 150s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities0-expected0] 150s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities2-expected2] 150s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities1-expected1] 150s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities3-expected3] 150s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities6-expected6] 150s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities4-expected4] 150s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities0-expected0] 150s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities5-expected5] 150s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities1-expected1] 150s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities2-expected2] 150s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities3-expected3] 150s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities4-expected4] 150s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities5-expected5] 150s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities6-expected6] 150s FAILED tests/test_exporter.py::test_dependency_walk_error[2.1] - assert 'bar=... 150s ======================= 103 failed, 38 passed in 11.01s ======================== 150s autopkgtest [09:21:25]: test pybuild-autopkgtest: -----------------------] 150s pybuild-autopkgtest FAIL non-zero exit status 25 150s autopkgtest [09:21:25]: test pybuild-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 151s autopkgtest [09:21:26]: @@@@@@@@@@@@@@@@@@@@ summary 151s pybuild-autopkgtest FAIL non-zero exit status 25 156s nova [W] Using flock in prodstack6-arm64 156s Creating nova instance adt-plucky-arm64-poetry-plugin-export-20250313-091853-juju-7f2275-prod-proposed-migration-environment-2-cc11e995-1cb5-4597-9877-e8c73dbec8ba from image adt/ubuntu-plucky-arm64-server-20250313.img (UUID 1e0d5b46-827c-482e-8813-f0c13efee277)... 156s nova [W] Timed out waiting for cfae1d22-8372-4320-9c26-0fe5acc6bdab to get deleted.