0s autopkgtest [04:55:07]: starting date and time: 2025-02-19 04:55:07+0000 0s autopkgtest [04:55:07]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [04:55:07]: host juju-7f2275-prod-proposed-migration-environment-9; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.3mott852/out --timeout-copy=6000 --setup-commands 'ln -s /dev/null /etc/systemd/system/bluetooth.service; printf "http_proxy=http://squid.internal:3128\nhttps_proxy=http://squid.internal:3128\nno_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\n" >> /etc/environment' --apt-pocket=proposed=src:python-click --apt-upgrade sqlfluff --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=python-click/8.2.0-1 -- lxd -r lxd-armhf-10.145.243.202 lxd-armhf-10.145.243.202:autopkgtest/ubuntu/plucky/armhf 53s autopkgtest [04:56:00]: testbed dpkg architecture: armhf 55s autopkgtest [04:56:02]: testbed apt version: 2.9.14ubuntu1 60s autopkgtest [04:56:07]: @@@@@@@@@@@@@@@@@@@@ test bed setup 62s autopkgtest [04:56:09]: testbed release detected to be: None 71s autopkgtest [04:56:18]: updating testbed package index (apt update) 73s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [110 kB] 73s Get:2 http://ftpmaster.internal/ubuntu plucky InRelease [249 kB] 74s Get:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease [110 kB] 74s Get:4 http://ftpmaster.internal/ubuntu plucky-security InRelease [110 kB] 74s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/restricted Sources [3120 B] 74s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [76.2 kB] 74s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [770 kB] 74s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [14.6 kB] 74s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf Packages [94.8 kB] 74s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf Components [5368 B] 74s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/restricted armhf Packages [760 B] 74s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/restricted armhf Components [216 B] 74s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/universe armhf Packages [641 kB] 74s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/universe armhf Components [256 kB] 74s Get:15 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse armhf Packages [4056 B] 74s Get:16 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse armhf Components [1076 B] 74s Get:17 http://ftpmaster.internal/ubuntu plucky/main Sources [1382 kB] 74s Get:18 http://ftpmaster.internal/ubuntu plucky/multiverse Sources [299 kB] 74s Get:19 http://ftpmaster.internal/ubuntu plucky/universe Sources [21.0 MB] 75s Get:20 http://ftpmaster.internal/ubuntu plucky/restricted Sources [16.3 kB] 75s Get:21 http://ftpmaster.internal/ubuntu plucky/main armhf Packages [1369 kB] 75s Get:22 http://ftpmaster.internal/ubuntu plucky/main armhf Components [402 kB] 75s Get:23 http://ftpmaster.internal/ubuntu plucky/restricted armhf Packages [2900 B] 75s Get:24 http://ftpmaster.internal/ubuntu plucky/restricted armhf Components [196 B] 75s Get:25 http://ftpmaster.internal/ubuntu plucky/universe armhf Packages [15.2 MB] 76s Get:26 http://ftpmaster.internal/ubuntu plucky/universe armhf Components [3941 kB] 76s Get:27 http://ftpmaster.internal/ubuntu plucky/multiverse armhf Packages [173 kB] 76s Get:28 http://ftpmaster.internal/ubuntu plucky/multiverse armhf Components [39.8 kB] 76s Get:29 http://ftpmaster.internal/ubuntu plucky-updates/main armhf Components [208 B] 76s Get:30 http://ftpmaster.internal/ubuntu plucky-updates/restricted armhf Components [212 B] 76s Get:31 http://ftpmaster.internal/ubuntu plucky-updates/universe armhf Components [212 B] 76s Get:32 http://ftpmaster.internal/ubuntu plucky-updates/multiverse armhf Components [212 B] 76s Get:33 http://ftpmaster.internal/ubuntu plucky-security/main armhf Components [204 B] 76s Get:34 http://ftpmaster.internal/ubuntu plucky-security/restricted armhf Components [212 B] 76s Get:35 http://ftpmaster.internal/ubuntu plucky-security/universe armhf Components [208 B] 76s Get:36 http://ftpmaster.internal/ubuntu plucky-security/multiverse armhf Components [212 B] 84s Fetched 46.2 MB in 8s (5941 kB/s) 85s Reading package lists... 92s autopkgtest [04:56:39]: upgrading testbed (apt dist-upgrade and autopurge) 94s Reading package lists... 95s Building dependency tree... 95s Reading state information... 96s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 97s Starting 2 pkgProblemResolver with broken count: 0 97s Done 98s Entering ResolveByKeep 99s 100s The following packages were automatically installed and are no longer required: 100s libassuan0 libicu74 libnsl2 libpython3.12-minimal libpython3.12-stdlib 100s libunwind8 linux-headers-6.11.0-8 linux-headers-6.11.0-8-generic python3.12 100s python3.12-minimal 100s Use 'apt autoremove' to remove them. 100s The following NEW packages will be installed: 100s gcc-15-base libapt-pkg7.0 libicu76 libpython3.13-minimal 100s libpython3.13-stdlib linux-headers-6.12.0-15 linux-headers-6.12.0-15-generic 100s login.defs openssl-provider-legacy python3-bcrypt python3.13 100s python3.13-minimal 100s The following packages will be upgraded: 100s apparmor apport apport-core-dump-handler appstream apt apt-utils base-passwd 100s bash bash-completion bind9-dnsutils bind9-host bind9-libs binutils 100s binutils-arm-linux-gnueabihf binutils-common bsdextrautils bsdutils 100s btrfs-progs busybox-initramfs busybox-static ca-certificates cloud-init 100s cloud-init-base console-setup console-setup-linux coreutils cron 100s cron-daemon-common curl dash dbus dbus-bin dbus-daemon 100s dbus-session-bus-common dbus-system-bus-common dbus-user-session dhcpcd-base 100s diffutils dirmngr distro-info dmsetup dpkg dpkg-dev dracut-install e2fsprogs 100s e2fsprogs-l10n ed eject ethtool fdisk fwupd gcc-14-base gettext-base 100s gir1.2-girepository-2.0 gir1.2-glib-2.0 gir1.2-packagekitglib-1.0 gnupg 100s gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpgconf gpgsm gpgv 100s groff-base gzip htop ibverbs-providers init init-system-helpers 100s initramfs-tools initramfs-tools-bin initramfs-tools-core iptables 100s iputils-ping iputils-tracepath keyboard-configuration keyboxd kpartx 100s krb5-locales libapparmor1 libappstream5 libapt-pkg6.0t64 libarchive13t64 100s libatomic1 libbinutils libblkid1 libblockdev-crypto3 libblockdev-fs3 100s libblockdev-loop3 libblockdev-mdraid3 libblockdev-nvme3 libblockdev-part3 100s libblockdev-swap3 libblockdev-utils3 libblockdev3 libbpf1 libc-bin libc6 100s libcap-ng0 libcom-err2 libcrypt1 libctf-nobfd0 libctf0 libcurl3t64-gnutls 100s libcurl4t64 libdbus-1-3 libdebconfclient0 libdevmapper1.02.1 libdpkg-perl 100s libedit2 libext2fs2t64 libfdisk1 libffi8 libfribidi0 libftdi1-2 libfwupd3 100s libgcc-s1 libgirepository-1.0-1 libglib2.0-0t64 libglib2.0-bin 100s libglib2.0-data libgnutls30t64 libgpg-error-l10n libgpg-error0 libgpgme11t64 100s libgssapi-krb5-2 libgstreamer1.0-0 libgudev-1.0-0 libhogweed6t64 libibverbs1 100s libicu74 libip4tc2 libip6tc2 libjson-glib-1.0-0 libjson-glib-1.0-common 100s libk5crypto3 libkrb5-3 libkrb5support0 libldap-common libldap2 liblz4-1 100s libmaxminddb0 libmount1 libncurses6 libncursesw6 libnetplan1 libnettle8t64 100s libnewt0.52 libnftables1 libnftnl11 libnpth0t64 libnspr4 libnss-systemd 100s libnss3 libnvme1t64 libp11-kit0 libpackagekit-glib2-18 libpam-systemd 100s libpcap0.8t64 libpng16-16t64 libpolkit-agent-1-0 libpolkit-gobject-1-0 100s libprotobuf-c1 libpython3-stdlib libpython3.12-minimal libpython3.12-stdlib 100s libqmi-glib5 libqmi-proxy libreadline8t64 libsasl2-2 libsasl2-modules 100s libsasl2-modules-db libselinux1 libsemanage-common libsemanage2 libsframe1 100s libsmartcols1 libss2 libssl3t64 libstdc++6 libsystemd-shared libsystemd0 100s libtasn1-6 libtinfo6 libtraceevent1 libtraceevent1-plugin libudev1 100s libudisks2-0 libunistring5 liburcu8t64 libusb-1.0-0 libuuid1 libvolume-key1 100s libwrap0 libxdmcp6 libxkbcommon0 libxml2 libxtables12 libxxhash0 libyaml-0-2 100s libzstd1 linux-headers-generic locales login logsave lshw make mawk mount 100s multipath-tools nano ncurses-base ncurses-bin ncurses-term netcat-openbsd 100s netplan-generator netplan.io nftables openssl packagekit packagekit-tools 100s passwd pci.ids pinentry-curses polkitd pollinate powermgmt-base psmisc 100s publicsuffix python-apt-common python-babel-localedata python3 100s python3-apport python3-apt python3-attr python3-babel python3-certifi 100s python3-chardet python3-cryptography python3-distro-info python3-gdbm 100s python3-gi python3-idna python3-jinja2 python3-json-pointer 100s python3-jsonpatch python3-jsonschema python3-jwt python3-launchpadlib 100s python3-lazr.uri python3-minimal python3-more-itertools python3-netplan 100s python3-newt python3-oauthlib python3-openssl python3-pkg-resources 100s python3-problem-report python3-pygments python3-referencing python3-rich 100s python3-setuptools python3-software-properties python3-urllib3 100s python3-wadllib python3.12 python3.12-gdbm python3.12-minimal 100s python3.13-gdbm readline-common rsync rsyslog software-properties-common 100s systemd systemd-cryptsetup systemd-resolved systemd-sysv systemd-timesyncd 100s tar tzdata ubuntu-minimal ubuntu-standard ucf udev udisks2 ufw 100s unattended-upgrades usb.ids util-linux uuid-runtime whiptail xauth xfsprogs 100s zstd 101s 296 upgraded, 12 newly installed, 0 to remove and 0 not upgraded. 101s Need to get 133 MB of archives. 101s After this operation, 198 MB of additional disk space will be used. 101s Get:1 http://ftpmaster.internal/ubuntu plucky/main armhf bash armhf 5.2.37-1ubuntu1 [677 kB] 101s Get:2 http://ftpmaster.internal/ubuntu plucky/main armhf bsdutils armhf 1:2.40.2-14ubuntu1 [110 kB] 101s Get:3 http://ftpmaster.internal/ubuntu plucky/main armhf coreutils armhf 9.5-1ubuntu1 [1275 kB] 101s Get:4 http://ftpmaster.internal/ubuntu plucky/main armhf dash armhf 0.5.12-12ubuntu1 [87.4 kB] 101s Get:5 http://ftpmaster.internal/ubuntu plucky/main armhf diffutils armhf 1:3.10-2 [172 kB] 101s Get:6 http://ftpmaster.internal/ubuntu plucky/main armhf gcc-15-base armhf 15-20250213-1ubuntu1 [53.2 kB] 101s Get:7 http://ftpmaster.internal/ubuntu plucky/main armhf libgcc-s1 armhf 15-20250213-1ubuntu1 [40.6 kB] 101s Get:8 http://ftpmaster.internal/ubuntu plucky/main armhf libc6 armhf 2.40-4ubuntu1 [2866 kB] 101s Get:9 http://ftpmaster.internal/ubuntu plucky/main armhf libxxhash0 armhf 0.8.3-2 [30.8 kB] 101s Get:10 http://ftpmaster.internal/ubuntu plucky/main armhf liblz4-1 armhf 1.10.0-3 [57.2 kB] 101s Get:11 http://ftpmaster.internal/ubuntu plucky/main armhf openssl-provider-legacy armhf 3.4.0-1ubuntu2 [29.4 kB] 101s Get:12 http://ftpmaster.internal/ubuntu plucky/main armhf libssl3t64 armhf 3.4.0-1ubuntu2 [1756 kB] 101s Get:13 http://ftpmaster.internal/ubuntu plucky/main armhf libzstd1 armhf 1.5.6+dfsg-2 [266 kB] 101s Get:14 http://ftpmaster.internal/ubuntu plucky/main armhf libstdc++6 armhf 15-20250213-1ubuntu1 [725 kB] 101s Get:15 http://ftpmaster.internal/ubuntu plucky/main armhf systemd-timesyncd armhf 257.2-3ubuntu1 [42.1 kB] 101s Get:16 http://ftpmaster.internal/ubuntu plucky/main armhf dbus-session-bus-common all 1.16.0-1ubuntu1 [53.1 kB] 101s Get:17 http://ftpmaster.internal/ubuntu plucky/main armhf systemd-sysv armhf 257.2-3ubuntu1 [11.9 kB] 101s Get:18 http://ftpmaster.internal/ubuntu plucky/main armhf libpam-systemd armhf 257.2-3ubuntu1 [238 kB] 101s Get:19 http://ftpmaster.internal/ubuntu plucky/main armhf dbus-user-session armhf 1.16.0-1ubuntu1 [9684 B] 101s Get:20 http://ftpmaster.internal/ubuntu plucky/main armhf libapparmor1 armhf 4.1.0~beta1-0ubuntu5 [47.3 kB] 101s Get:21 http://ftpmaster.internal/ubuntu plucky/main armhf libcap-ng0 armhf 0.8.5-4 [13.8 kB] 101s Get:22 http://ftpmaster.internal/ubuntu plucky/main armhf libselinux1 armhf 3.7-3ubuntu2 [73.2 kB] 101s Get:23 http://ftpmaster.internal/ubuntu plucky/main armhf dbus-system-bus-common all 1.16.0-1ubuntu1 [54.3 kB] 101s Get:24 http://ftpmaster.internal/ubuntu plucky/main armhf dbus-bin armhf 1.16.0-1ubuntu1 [37.9 kB] 101s Get:25 http://ftpmaster.internal/ubuntu plucky/main armhf dbus armhf 1.16.0-1ubuntu1 [28.1 kB] 101s Get:26 http://ftpmaster.internal/ubuntu plucky/main armhf dbus-daemon armhf 1.16.0-1ubuntu1 [111 kB] 101s Get:27 http://ftpmaster.internal/ubuntu plucky/main armhf libdbus-1-3 armhf 1.16.0-1ubuntu1 [162 kB] 101s Get:28 http://ftpmaster.internal/ubuntu plucky/main armhf systemd-resolved armhf 257.2-3ubuntu1 [315 kB] 102s Get:29 http://ftpmaster.internal/ubuntu plucky/main armhf systemd-cryptsetup armhf 257.2-3ubuntu1 [126 kB] 102s Get:30 http://ftpmaster.internal/ubuntu plucky/main armhf libncurses6 armhf 6.5+20250125-2 [88.8 kB] 102s Get:31 http://ftpmaster.internal/ubuntu plucky/main armhf libncursesw6 armhf 6.5+20250125-2 [118 kB] 102s Get:32 http://ftpmaster.internal/ubuntu plucky/main armhf libtinfo6 armhf 6.5+20250125-2 [91.9 kB] 102s Get:33 http://ftpmaster.internal/ubuntu plucky/main armhf bsdextrautils armhf 2.40.2-14ubuntu1 [94.2 kB] 102s Get:34 http://ftpmaster.internal/ubuntu plucky/main armhf eject armhf 2.40.2-14ubuntu1 [63.4 kB] 102s Get:35 http://ftpmaster.internal/ubuntu plucky/main armhf fdisk armhf 2.40.2-14ubuntu1 [157 kB] 102s Get:36 http://ftpmaster.internal/ubuntu plucky/main armhf libblkid1 armhf 2.40.2-14ubuntu1 [169 kB] 102s Get:37 http://ftpmaster.internal/ubuntu plucky/main armhf libmount1 armhf 2.40.2-14ubuntu1 [194 kB] 102s Get:38 http://ftpmaster.internal/ubuntu plucky/main armhf libsmartcols1 armhf 2.40.2-14ubuntu1 [137 kB] 102s Get:39 http://ftpmaster.internal/ubuntu plucky/main armhf libuuid1 armhf 2.40.2-14ubuntu1 [41.0 kB] 102s Get:40 http://ftpmaster.internal/ubuntu plucky/main armhf util-linux armhf 2.40.2-14ubuntu1 [1190 kB] 102s Get:41 http://ftpmaster.internal/ubuntu plucky/main armhf uuid-runtime armhf 2.40.2-14ubuntu1 [63.7 kB] 102s Get:42 http://ftpmaster.internal/ubuntu plucky/main armhf libfdisk1 armhf 2.40.2-14ubuntu1 [217 kB] 102s Get:43 http://ftpmaster.internal/ubuntu plucky/main armhf mount armhf 2.40.2-14ubuntu1 [158 kB] 102s Get:44 http://ftpmaster.internal/ubuntu plucky/main armhf readline-common all 8.2-6 [56.5 kB] 102s Get:45 http://ftpmaster.internal/ubuntu plucky/main armhf libreadline8t64 armhf 8.2-6 [131 kB] 102s Get:46 http://ftpmaster.internal/ubuntu plucky/main armhf libcrypt1 armhf 1:4.4.38-1 [91.7 kB] 102s Get:47 http://ftpmaster.internal/ubuntu plucky/main armhf libsystemd-shared armhf 257.2-3ubuntu1 [2203 kB] 102s Get:48 http://ftpmaster.internal/ubuntu plucky/main armhf systemd armhf 257.2-3ubuntu1 [3028 kB] 102s Get:49 http://ftpmaster.internal/ubuntu plucky/main armhf udev armhf 257.2-3ubuntu1 [1402 kB] 102s Get:50 http://ftpmaster.internal/ubuntu plucky/main armhf libnss-systemd armhf 257.2-3ubuntu1 [164 kB] 102s Get:51 http://ftpmaster.internal/ubuntu plucky/main armhf libudev1 armhf 257.2-3ubuntu1 [193 kB] 102s Get:52 http://ftpmaster.internal/ubuntu plucky/main armhf libsystemd0 armhf 257.2-3ubuntu1 [494 kB] 102s Get:53 http://ftpmaster.internal/ubuntu plucky/main armhf libapt-pkg6.0t64 armhf 2.9.29 [1086 kB] 102s Get:54 http://ftpmaster.internal/ubuntu plucky/main armhf tar armhf 1.35+dfsg-3.1 [240 kB] 102s Get:55 http://ftpmaster.internal/ubuntu plucky/main armhf dpkg armhf 1.22.11ubuntu4 [1242 kB] 102s Get:56 http://ftpmaster.internal/ubuntu plucky/main armhf gzip armhf 1.13-1ubuntu2 [98.1 kB] 102s Get:57 http://ftpmaster.internal/ubuntu plucky/main armhf ncurses-bin armhf 6.5+20250125-2 [179 kB] 102s Get:58 http://ftpmaster.internal/ubuntu plucky/main armhf libdebconfclient0 armhf 0.274ubuntu1 [11.2 kB] 102s Get:59 http://ftpmaster.internal/ubuntu plucky/main armhf base-passwd armhf 3.6.6 [53.4 kB] 102s Get:60 http://ftpmaster.internal/ubuntu plucky/main armhf init-system-helpers all 1.68 [39.0 kB] 102s Get:61 http://ftpmaster.internal/ubuntu plucky/main armhf libc-bin armhf 2.40-4ubuntu1 [542 kB] 102s Get:62 http://ftpmaster.internal/ubuntu plucky/main armhf ncurses-base all 6.5+20250125-2 [25.8 kB] 102s Get:63 http://ftpmaster.internal/ubuntu plucky/main armhf ncurses-term all 6.5+20250125-2 [276 kB] 102s Get:64 http://ftpmaster.internal/ubuntu plucky/main armhf libapt-pkg7.0 armhf 2.9.30 [1065 kB] 102s Get:65 http://ftpmaster.internal/ubuntu plucky/main armhf apt armhf 2.9.30 [1390 kB] 102s Get:66 http://ftpmaster.internal/ubuntu plucky/main armhf apt-utils armhf 2.9.30 [214 kB] 102s Get:67 http://ftpmaster.internal/ubuntu plucky/main armhf libgpg-error-l10n all 1.51-3 [8800 B] 102s Get:68 http://ftpmaster.internal/ubuntu plucky/main armhf libgpg-error0 armhf 1.51-3 [64.8 kB] 102s Get:69 http://ftpmaster.internal/ubuntu plucky/main armhf libnpth0t64 armhf 1.8-2 [7572 B] 102s Get:70 http://ftpmaster.internal/ubuntu plucky/main armhf gpg-wks-client armhf 2.4.4-2ubuntu22 [87.5 kB] 102s Get:71 http://ftpmaster.internal/ubuntu plucky/main armhf dirmngr armhf 2.4.4-2ubuntu22 [347 kB] 102s Get:72 http://ftpmaster.internal/ubuntu plucky/main armhf gpgsm armhf 2.4.4-2ubuntu22 [242 kB] 102s Get:73 http://ftpmaster.internal/ubuntu plucky/main armhf gnupg-utils armhf 2.4.4-2ubuntu22 [159 kB] 102s Get:74 http://ftpmaster.internal/ubuntu plucky/main armhf gpg-agent armhf 2.4.4-2ubuntu22 [237 kB] 102s Get:75 http://ftpmaster.internal/ubuntu plucky/main armhf gpg armhf 2.4.4-2ubuntu22 [525 kB] 102s Get:76 http://ftpmaster.internal/ubuntu plucky/main armhf gpgconf armhf 2.4.4-2ubuntu22 [116 kB] 102s Get:77 http://ftpmaster.internal/ubuntu plucky/main armhf gnupg all 2.4.4-2ubuntu22 [359 kB] 102s Get:78 http://ftpmaster.internal/ubuntu plucky/main armhf keyboxd armhf 2.4.4-2ubuntu22 [111 kB] 102s Get:79 http://ftpmaster.internal/ubuntu plucky/main armhf pinentry-curses armhf 1.3.1-2ubuntu2 [40.6 kB] 102s Get:80 http://ftpmaster.internal/ubuntu plucky/main armhf libnettle8t64 armhf 3.10.1-1 [188 kB] 102s Get:81 http://ftpmaster.internal/ubuntu plucky/main armhf libhogweed6t64 armhf 3.10.1-1 [188 kB] 102s Get:82 http://ftpmaster.internal/ubuntu plucky/main armhf libffi8 armhf 3.4.7-1 [21.1 kB] 102s Get:83 http://ftpmaster.internal/ubuntu plucky/main armhf libp11-kit0 armhf 0.25.5-2ubuntu2 [261 kB] 102s Get:84 http://ftpmaster.internal/ubuntu plucky/main armhf libtasn1-6 armhf 4.20.0-2 [38.2 kB] 102s Get:85 http://ftpmaster.internal/ubuntu plucky/main armhf libunistring5 armhf 1.3-1 [583 kB] 102s Get:86 http://ftpmaster.internal/ubuntu plucky/main armhf libgnutls30t64 armhf 3.8.9-2ubuntu1 [961 kB] 102s Get:87 http://ftpmaster.internal/ubuntu plucky/main armhf libsasl2-modules-db armhf 2.1.28+dfsg1-8build1 [19.0 kB] 102s Get:88 http://ftpmaster.internal/ubuntu plucky/main armhf libsasl2-2 armhf 2.1.28+dfsg1-8build1 [49.9 kB] 102s Get:89 http://ftpmaster.internal/ubuntu plucky/main armhf libldap-common all 2.6.9+dfsg-1~exp2ubuntu1 [33.2 kB] 102s Get:90 http://ftpmaster.internal/ubuntu plucky/main armhf libldap2 armhf 2.6.9+dfsg-1~exp2ubuntu1 [177 kB] 102s Get:91 http://ftpmaster.internal/ubuntu plucky/main armhf gpgv armhf 2.4.4-2ubuntu22 [225 kB] 102s Get:92 http://ftpmaster.internal/ubuntu plucky/main armhf e2fsprogs-l10n all 1.47.2-1ubuntu1 [7030 B] 102s Get:93 http://ftpmaster.internal/ubuntu plucky/main armhf logsave armhf 1.47.2-1ubuntu1 [25.7 kB] 102s Get:94 http://ftpmaster.internal/ubuntu plucky/main armhf ubuntu-minimal armhf 1.547 [11.4 kB] 103s Get:95 http://ftpmaster.internal/ubuntu plucky/main armhf initramfs-tools all 0.145ubuntu2 [7948 B] 103s Get:96 http://ftpmaster.internal/ubuntu plucky/main armhf initramfs-tools-core all 0.145ubuntu2 [51.5 kB] 103s Get:97 http://ftpmaster.internal/ubuntu plucky/main armhf libext2fs2t64 armhf 1.47.2-1ubuntu1 [207 kB] 103s Get:98 http://ftpmaster.internal/ubuntu plucky/main armhf e2fsprogs armhf 1.47.2-1ubuntu1 [588 kB] 103s Get:99 http://ftpmaster.internal/ubuntu plucky/main armhf console-setup-linux all 1.226ubuntu3 [1880 kB] 103s Get:100 http://ftpmaster.internal/ubuntu plucky/main armhf console-setup all 1.226ubuntu3 [110 kB] 103s Get:101 http://ftpmaster.internal/ubuntu plucky/main armhf keyboard-configuration all 1.226ubuntu3 [212 kB] 103s Get:102 http://ftpmaster.internal/ubuntu plucky/main armhf dhcpcd-base armhf 1:10.1.0-7 [188 kB] 103s Get:103 http://ftpmaster.internal/ubuntu plucky/main armhf init armhf 1.68 [6296 B] 103s Get:104 http://ftpmaster.internal/ubuntu plucky/main armhf iputils-ping armhf 3:20240905-1ubuntu1 [45.0 kB] 103s Get:105 http://ftpmaster.internal/ubuntu plucky/main armhf locales all 2.40-4ubuntu1 [4224 kB] 103s Get:106 http://ftpmaster.internal/ubuntu plucky/main armhf login.defs all 1:4.16.0-7ubuntu1 [38.5 kB] 103s Get:107 http://ftpmaster.internal/ubuntu plucky/main armhf login armhf 1:4.16.0-2+really2.40.2-14ubuntu1 [85.0 kB] 103s Get:108 http://ftpmaster.internal/ubuntu plucky/main armhf mawk armhf 1.3.4.20250131-1 [119 kB] 103s Get:109 http://ftpmaster.internal/ubuntu plucky/main armhf netcat-openbsd armhf 1.228-1 [42.4 kB] 103s Get:110 http://ftpmaster.internal/ubuntu plucky/main armhf libpython3.13-minimal armhf 3.13.2-1 [868 kB] 103s Get:111 http://ftpmaster.internal/ubuntu plucky/main armhf python3.13-minimal armhf 3.13.2-1 [2012 kB] 104s Get:112 http://ftpmaster.internal/ubuntu plucky/main armhf python3-cryptography armhf 43.0.0-1 [925 kB] 104s Get:113 http://ftpmaster.internal/ubuntu plucky/main armhf python3-minimal armhf 3.13.1-1~exp2 [27.6 kB] 104s Get:114 http://ftpmaster.internal/ubuntu plucky/main armhf python3 armhf 3.13.1-1~exp2 [23.9 kB] 104s Get:115 http://ftpmaster.internal/ubuntu plucky/main armhf python3-bcrypt armhf 4.2.0-2.1 [239 kB] 104s Get:116 http://ftpmaster.internal/ubuntu plucky/main armhf tzdata all 2025a-2ubuntu1 [198 kB] 104s Get:117 http://ftpmaster.internal/ubuntu plucky/main armhf libpython3.13-stdlib armhf 3.13.2-1 [1969 kB] 104s Get:118 http://ftpmaster.internal/ubuntu plucky/main armhf python3.13 armhf 3.13.2-1 [734 kB] 104s Get:119 http://ftpmaster.internal/ubuntu plucky/main armhf libpython3-stdlib armhf 3.13.1-1~exp2 [10.2 kB] 104s Get:120 http://ftpmaster.internal/ubuntu plucky/main armhf gir1.2-girepository-2.0 armhf 1.82.0-4 [25.3 kB] 104s Get:121 http://ftpmaster.internal/ubuntu plucky/main armhf gir1.2-glib-2.0 armhf 2.83.3-2 [184 kB] 104s Get:122 http://ftpmaster.internal/ubuntu plucky/main armhf libgirepository-1.0-1 armhf 1.82.0-4 [109 kB] 104s Get:123 http://ftpmaster.internal/ubuntu plucky/main armhf libglib2.0-data all 2.83.3-2 [52.7 kB] 104s Get:124 http://ftpmaster.internal/ubuntu plucky/main armhf libglib2.0-bin armhf 2.83.3-2 [92.7 kB] 104s Get:125 http://ftpmaster.internal/ubuntu plucky/main armhf libatomic1 armhf 15-20250213-1ubuntu1 [7938 B] 104s Get:126 http://ftpmaster.internal/ubuntu plucky/main armhf libglib2.0-0t64 armhf 2.83.3-2 [1452 kB] 104s Get:127 http://ftpmaster.internal/ubuntu plucky/main armhf netplan-generator armhf 1.1.2-2ubuntu1 [60.8 kB] 104s Get:128 http://ftpmaster.internal/ubuntu plucky/main armhf libyaml-0-2 armhf 0.2.5-2 [45.3 kB] 104s Get:129 http://ftpmaster.internal/ubuntu plucky/main armhf python3-netplan armhf 1.1.2-2ubuntu1 [24.2 kB] 104s Get:130 http://ftpmaster.internal/ubuntu plucky/main armhf netplan.io armhf 1.1.2-2ubuntu1 [67.7 kB] 104s Get:131 http://ftpmaster.internal/ubuntu plucky/main armhf libnetplan1 armhf 1.1.2-2ubuntu1 [123 kB] 104s Get:132 http://ftpmaster.internal/ubuntu plucky/main armhf ethtool armhf 1:6.11-1 [222 kB] 104s Get:133 http://ftpmaster.internal/ubuntu plucky/main armhf libsemanage-common all 3.7-2.1 [7198 B] 104s Get:134 http://ftpmaster.internal/ubuntu plucky/main armhf libsemanage2 armhf 3.7-2.1 [85.4 kB] 104s Get:135 http://ftpmaster.internal/ubuntu plucky/main armhf passwd armhf 1:4.16.0-7ubuntu1 [1041 kB] 104s Get:136 http://ftpmaster.internal/ubuntu plucky/main armhf python3-newt armhf 0.52.24-4ubuntu1 [20.1 kB] 104s Get:137 http://ftpmaster.internal/ubuntu plucky/main armhf libnewt0.52 armhf 0.52.24-4ubuntu1 [39.7 kB] 104s Get:138 http://ftpmaster.internal/ubuntu plucky/main armhf whiptail armhf 0.52.24-4ubuntu1 [17.3 kB] 104s Get:139 http://ftpmaster.internal/ubuntu plucky/main armhf dracut-install armhf 106-2ubuntu1 [38.7 kB] 104s Get:140 http://ftpmaster.internal/ubuntu plucky/main armhf initramfs-tools-bin armhf 0.145ubuntu2 [24.5 kB] 104s Get:141 http://ftpmaster.internal/ubuntu plucky/main armhf busybox-initramfs armhf 1:1.37.0-4ubuntu1 [188 kB] 104s Get:142 http://ftpmaster.internal/ubuntu plucky/main armhf python3.12 armhf 3.12.9-1 [671 kB] 104s Get:143 http://ftpmaster.internal/ubuntu plucky/main armhf libpython3.12-stdlib armhf 3.12.9-1 [1946 kB] 104s Get:144 http://ftpmaster.internal/ubuntu plucky/main armhf python3.12-minimal armhf 3.12.9-1 [2012 kB] 104s Get:145 http://ftpmaster.internal/ubuntu plucky/main armhf libpython3.12-minimal armhf 3.12.9-1 [825 kB] 104s Get:146 http://ftpmaster.internal/ubuntu plucky/main armhf cron armhf 3.0pl1-192ubuntu1 [84.2 kB] 104s Get:147 http://ftpmaster.internal/ubuntu plucky/main armhf rsync armhf 3.4.1-0syncable1 [422 kB] 104s Get:148 http://ftpmaster.internal/ubuntu plucky/main armhf python-apt-common all 2.9.8 [21.1 kB] 104s Get:149 http://ftpmaster.internal/ubuntu plucky/main armhf python3-apt armhf 2.9.8 [174 kB] 104s Get:150 http://ftpmaster.internal/ubuntu plucky/main armhf python3-lazr.uri all 1.0.6-5 [13.6 kB] 104s Get:151 http://ftpmaster.internal/ubuntu plucky/main armhf python3-launchpadlib all 2.1.0-1 [126 kB] 104s Get:152 http://ftpmaster.internal/ubuntu plucky/main armhf python3-problem-report all 2.31.0-0ubuntu5 [25.5 kB] 104s Get:153 http://ftpmaster.internal/ubuntu plucky/main armhf python3-apport all 2.31.0-0ubuntu5 [93.1 kB] 104s Get:154 http://ftpmaster.internal/ubuntu plucky/main armhf python3-gi armhf 3.50.0-4 [260 kB] 104s Get:155 http://ftpmaster.internal/ubuntu plucky/main armhf apport-core-dump-handler all 2.31.0-0ubuntu5 [18.4 kB] 104s Get:156 http://ftpmaster.internal/ubuntu plucky/main armhf apport all 2.31.0-0ubuntu5 [83.0 kB] 104s Get:157 http://ftpmaster.internal/ubuntu plucky/main armhf gcc-14-base armhf 14.2.0-17ubuntu1 [53.5 kB] 104s Get:158 http://ftpmaster.internal/ubuntu plucky/main armhf libcom-err2 armhf 1.47.2-1ubuntu1 [25.6 kB] 104s Get:159 http://ftpmaster.internal/ubuntu plucky/main armhf libss2 armhf 1.47.2-1ubuntu1 [15.6 kB] 104s Get:160 http://ftpmaster.internal/ubuntu plucky/main armhf openssl armhf 3.4.0-1ubuntu2 [1159 kB] 104s Get:161 http://ftpmaster.internal/ubuntu plucky/main armhf ca-certificates all 20241223 [165 kB] 104s Get:162 http://ftpmaster.internal/ubuntu plucky/main armhf distro-info armhf 1.13 [19.1 kB] 104s Get:163 http://ftpmaster.internal/ubuntu plucky/main armhf krb5-locales all 1.21.3-4ubuntu1 [14.7 kB] 104s Get:164 http://ftpmaster.internal/ubuntu plucky/main armhf libbpf1 armhf 1:1.5.0-2 [158 kB] 104s Get:165 http://ftpmaster.internal/ubuntu plucky/main armhf libfribidi0 armhf 1.0.16-1 [24.3 kB] 104s Get:166 http://ftpmaster.internal/ubuntu plucky/main armhf libgssapi-krb5-2 armhf 1.21.3-4ubuntu1 [121 kB] 104s Get:167 http://ftpmaster.internal/ubuntu plucky/main armhf libkrb5-3 armhf 1.21.3-4ubuntu1 [314 kB] 104s Get:168 http://ftpmaster.internal/ubuntu plucky/main armhf libkrb5support0 armhf 1.21.3-4ubuntu1 [31.8 kB] 104s Get:169 http://ftpmaster.internal/ubuntu plucky/main armhf libk5crypto3 armhf 1.21.3-4ubuntu1 [78.6 kB] 104s Get:170 http://ftpmaster.internal/ubuntu plucky/main armhf libicu74 armhf 74.2-1ubuntu6 [10.5 MB] 105s Get:171 http://ftpmaster.internal/ubuntu plucky/main armhf libxml2 armhf 2.12.7+dfsg+really2.9.14-0.2ubuntu3 [599 kB] 105s Get:172 http://ftpmaster.internal/ubuntu plucky/main armhf iptables armhf 1.8.11-2ubuntu1 [342 kB] 105s Get:173 http://ftpmaster.internal/ubuntu plucky/main armhf libip4tc2 armhf 1.8.11-2ubuntu1 [21.7 kB] 105s Get:174 http://ftpmaster.internal/ubuntu plucky/main armhf libip6tc2 armhf 1.8.11-2ubuntu1 [22.1 kB] 105s Get:175 http://ftpmaster.internal/ubuntu plucky/main armhf libnftnl11 armhf 1.2.8-1 [53.3 kB] 105s Get:176 http://ftpmaster.internal/ubuntu plucky/main armhf libxtables12 armhf 1.8.11-2ubuntu1 [33.0 kB] 105s Get:177 http://ftpmaster.internal/ubuntu plucky/main armhf python3-pygments all 2.18.0+dfsg-2 [835 kB] 105s Get:178 http://ftpmaster.internal/ubuntu plucky/main armhf python3-rich all 13.9.4-1 [190 kB] 105s Get:179 http://ftpmaster.internal/ubuntu plucky/main armhf ucf all 3.0049 [43.3 kB] 105s Get:180 http://ftpmaster.internal/ubuntu plucky/main armhf rsyslog armhf 8.2412.0-2ubuntu1 [471 kB] 105s Get:181 http://ftpmaster.internal/ubuntu plucky/main armhf apparmor armhf 4.1.0~beta1-0ubuntu5 [589 kB] 105s Get:182 http://ftpmaster.internal/ubuntu plucky/main armhf bash-completion all 1:2.16.0-7 [214 kB] 105s Get:183 http://ftpmaster.internal/ubuntu plucky/main armhf libmaxminddb0 armhf 1.12.2-1 [16.9 kB] 105s Get:184 http://ftpmaster.internal/ubuntu plucky/main armhf liburcu8t64 armhf 0.15.0-1 [57.3 kB] 105s Get:185 http://ftpmaster.internal/ubuntu plucky/main armhf bind9-dnsutils armhf 1:9.20.0-2ubuntu4 [155 kB] 105s Get:186 http://ftpmaster.internal/ubuntu plucky/main armhf bind9-host armhf 1:9.20.0-2ubuntu4 [46.2 kB] 105s Get:187 http://ftpmaster.internal/ubuntu plucky/main armhf bind9-libs armhf 1:9.20.0-2ubuntu4 [1176 kB] 105s Get:188 http://ftpmaster.internal/ubuntu plucky/main armhf libedit2 armhf 3.1-20250104-1 [79.3 kB] 105s Get:189 http://ftpmaster.internal/ubuntu plucky/main armhf busybox-static armhf 1:1.37.0-4ubuntu1 [857 kB] 105s Get:190 http://ftpmaster.internal/ubuntu plucky/main armhf cron-daemon-common all 3.0pl1-192ubuntu1 [14.5 kB] 105s Get:191 http://ftpmaster.internal/ubuntu plucky/main armhf libdevmapper1.02.1 armhf 2:1.02.201-1ubuntu1 [137 kB] 105s Get:192 http://ftpmaster.internal/ubuntu plucky/main armhf dmsetup armhf 2:1.02.201-1ubuntu1 [80.4 kB] 105s Get:193 http://ftpmaster.internal/ubuntu plucky/main armhf ed armhf 1.21-1 [52.8 kB] 105s Get:194 http://ftpmaster.internal/ubuntu plucky/main armhf gettext-base armhf 0.23.1-1 [43.3 kB] 105s Get:195 http://ftpmaster.internal/ubuntu plucky/main armhf groff-base armhf 1.23.0-7 [949 kB] 105s Get:196 http://ftpmaster.internal/ubuntu plucky/main armhf libibverbs1 armhf 55.0-1ubuntu1 [58.5 kB] 105s Get:197 http://ftpmaster.internal/ubuntu plucky/main armhf ibverbs-providers armhf 55.0-1ubuntu1 [27.6 kB] 105s Get:198 http://ftpmaster.internal/ubuntu plucky/main armhf iputils-tracepath armhf 3:20240905-1ubuntu1 [13.3 kB] 105s Get:199 http://ftpmaster.internal/ubuntu plucky/main armhf nftables armhf 1.1.1-1build1 [70.8 kB] 105s Get:200 http://ftpmaster.internal/ubuntu plucky/main armhf libnftables1 armhf 1.1.1-1build1 [321 kB] 105s Get:201 http://ftpmaster.internal/ubuntu plucky/main armhf libpcap0.8t64 armhf 1.10.5-2ubuntu1 [140 kB] 105s Get:202 http://ftpmaster.internal/ubuntu plucky/main armhf libpng16-16t64 armhf 1.6.46-4 [171 kB] 105s Get:203 http://ftpmaster.internal/ubuntu plucky/main armhf libtraceevent1-plugin armhf 1:1.8.4-2 [19.0 kB] 106s Get:204 http://ftpmaster.internal/ubuntu plucky/main armhf libtraceevent1 armhf 1:1.8.4-2 [53.8 kB] 106s Get:205 http://ftpmaster.internal/ubuntu plucky/main armhf libusb-1.0-0 armhf 2:1.0.27-2 [49.5 kB] 106s Get:206 http://ftpmaster.internal/ubuntu plucky/main armhf libxdmcp6 armhf 1:1.1.5-1 [9060 B] 106s Get:207 http://ftpmaster.internal/ubuntu plucky/main armhf libxkbcommon0 armhf 1.7.0-2 [113 kB] 106s Get:208 http://ftpmaster.internal/ubuntu plucky/main armhf lshw armhf 02.19.git.2021.06.19.996aaad9c7-2.1ubuntu1 [311 kB] 106s Get:209 http://ftpmaster.internal/ubuntu plucky/main armhf nano armhf 8.3-1 [277 kB] 106s Get:210 http://ftpmaster.internal/ubuntu plucky/main armhf pci.ids all 0.0~2025.02.12-1 [284 kB] 106s Get:211 http://ftpmaster.internal/ubuntu plucky/main armhf powermgmt-base all 1.38 [7378 B] 106s Get:212 http://ftpmaster.internal/ubuntu plucky/main armhf psmisc armhf 23.7-2 [177 kB] 106s Get:213 http://ftpmaster.internal/ubuntu plucky/main armhf publicsuffix all 20250108.1153-0.1 [134 kB] 106s Get:214 http://ftpmaster.internal/ubuntu plucky/main armhf python3-distro-info all 1.13 [7798 B] 106s Get:215 http://ftpmaster.internal/ubuntu plucky/main armhf python3.13-gdbm armhf 3.13.2-1 [30.2 kB] 106s Get:216 http://ftpmaster.internal/ubuntu plucky/main armhf python3.12-gdbm armhf 3.12.9-1 [29.3 kB] 106s Get:217 http://ftpmaster.internal/ubuntu plucky/main armhf python3-gdbm armhf 3.13.1-1 [8668 B] 106s Get:218 http://ftpmaster.internal/ubuntu plucky/main armhf ubuntu-standard armhf 1.547 [11.4 kB] 106s Get:219 http://ftpmaster.internal/ubuntu plucky/main armhf ufw all 0.36.2-9 [170 kB] 106s Get:220 http://ftpmaster.internal/ubuntu plucky/main armhf usb.ids all 2025.01.14-1 [223 kB] 106s Get:221 http://ftpmaster.internal/ubuntu plucky/main armhf xauth armhf 1:1.1.2-1.1 [23.0 kB] 106s Get:222 http://ftpmaster.internal/ubuntu plucky/main armhf libcurl3t64-gnutls armhf 8.12.0+git20250209.89ed161+ds-1ubuntu1 [330 kB] 106s Get:223 http://ftpmaster.internal/ubuntu plucky/main armhf libappstream5 armhf 1.0.4-1 [211 kB] 106s Get:224 http://ftpmaster.internal/ubuntu plucky/main armhf appstream armhf 1.0.4-1 [67.3 kB] 106s Get:225 http://ftpmaster.internal/ubuntu plucky/main armhf libctf0 armhf 2.44-1ubuntu1 [74.4 kB] 106s Get:226 http://ftpmaster.internal/ubuntu plucky/main armhf libctf-nobfd0 armhf 2.44-1ubuntu1 [77.6 kB] 106s Get:227 http://ftpmaster.internal/ubuntu plucky/main armhf binutils-arm-linux-gnueabihf armhf 2.44-1ubuntu1 [995 kB] 106s Get:228 http://ftpmaster.internal/ubuntu plucky/main armhf libbinutils armhf 2.44-1ubuntu1 [405 kB] 106s Get:229 http://ftpmaster.internal/ubuntu plucky/main armhf binutils armhf 2.44-1ubuntu1 [3238 B] 106s Get:230 http://ftpmaster.internal/ubuntu plucky/main armhf binutils-common armhf 2.44-1ubuntu1 [216 kB] 106s Get:231 http://ftpmaster.internal/ubuntu plucky/main armhf libsframe1 armhf 2.44-1ubuntu1 [12.5 kB] 106s Get:232 http://ftpmaster.internal/ubuntu plucky/main armhf btrfs-progs armhf 6.12-1build1 [884 kB] 106s Get:233 http://ftpmaster.internal/ubuntu plucky/main armhf python3-jinja2 all 3.1.5-2 [109 kB] 106s Get:234 http://ftpmaster.internal/ubuntu plucky/main armhf python3-json-pointer all 2.4-3 [8444 B] 106s Get:235 http://ftpmaster.internal/ubuntu plucky/main armhf python3-jsonpatch all 1.32-5 [12.3 kB] 106s Get:236 http://ftpmaster.internal/ubuntu plucky/main armhf python3-attr all 25.1.0-1 [50.4 kB] 106s Get:237 http://ftpmaster.internal/ubuntu plucky/main armhf python3-referencing all 0.35.1-2ubuntu1 [21.9 kB] 106s Get:238 http://ftpmaster.internal/ubuntu plucky/main armhf python3-jsonschema all 4.19.2-6ubuntu1 [65.5 kB] 106s Get:239 http://ftpmaster.internal/ubuntu plucky/main armhf python3-jwt all 2.10.1-2 [21.0 kB] 106s Get:240 http://ftpmaster.internal/ubuntu plucky/main armhf python3-oauthlib all 3.2.2-3 [89.9 kB] 106s Get:241 http://ftpmaster.internal/ubuntu plucky/main armhf cloud-init-base all 25.1~3geb1965a4-0ubuntu1 [615 kB] 106s Get:242 http://ftpmaster.internal/ubuntu plucky/main armhf curl armhf 8.12.0+git20250209.89ed161+ds-1ubuntu1 [247 kB] 106s Get:243 http://ftpmaster.internal/ubuntu plucky/main armhf libcurl4t64 armhf 8.12.0+git20250209.89ed161+ds-1ubuntu1 [335 kB] 106s Get:244 http://ftpmaster.internal/ubuntu plucky/main armhf dpkg-dev all 1.22.11ubuntu4 [1088 kB] 106s Get:245 http://ftpmaster.internal/ubuntu plucky/main armhf libdpkg-perl all 1.22.11ubuntu4 [279 kB] 106s Get:246 http://ftpmaster.internal/ubuntu plucky/main armhf make armhf 4.4.1-1 [180 kB] 106s Get:247 http://ftpmaster.internal/ubuntu plucky/main armhf libarchive13t64 armhf 3.7.7-0ubuntu1 [335 kB] 106s Get:248 http://ftpmaster.internal/ubuntu plucky/main armhf libjson-glib-1.0-common all 1.10.6+ds-1 [5636 B] 106s Get:249 http://ftpmaster.internal/ubuntu plucky/main armhf libjson-glib-1.0-0 armhf 1.10.6+ds-1 [59.5 kB] 106s Get:250 http://ftpmaster.internal/ubuntu plucky/main armhf fwupd armhf 2.0.5-1 [5151 kB] 107s Get:251 http://ftpmaster.internal/ubuntu plucky/main armhf libfwupd3 armhf 2.0.5-1 [125 kB] 107s Get:252 http://ftpmaster.internal/ubuntu plucky/main armhf polkitd armhf 126-2 [92.5 kB] 107s Get:253 http://ftpmaster.internal/ubuntu plucky/main armhf libpolkit-agent-1-0 armhf 126-2 [15.1 kB] 107s Get:254 http://ftpmaster.internal/ubuntu plucky/main armhf libpolkit-gobject-1-0 armhf 126-2 [45.0 kB] 107s Get:255 http://ftpmaster.internal/ubuntu plucky/main armhf libprotobuf-c1 armhf 1.5.1-1ubuntu1 [18.1 kB] 107s Get:256 http://ftpmaster.internal/ubuntu plucky/main armhf libqmi-proxy armhf 1.35.6-1 [5878 B] 107s Get:257 http://ftpmaster.internal/ubuntu plucky/main armhf libqmi-glib5 armhf 1.35.6-1 [928 kB] 107s Get:258 http://ftpmaster.internal/ubuntu plucky/main armhf libpackagekit-glib2-18 armhf 1.3.0-3build1 [109 kB] 107s Get:259 http://ftpmaster.internal/ubuntu plucky/main armhf gir1.2-packagekitglib-1.0 armhf 1.3.0-3build1 [25.5 kB] 107s Get:260 http://ftpmaster.internal/ubuntu plucky/main armhf gnupg-l10n all 2.4.4-2ubuntu22 [66.4 kB] 107s Get:261 http://ftpmaster.internal/ubuntu plucky/main armhf htop armhf 3.3.0-5 [140 kB] 107s Get:262 http://ftpmaster.internal/ubuntu plucky/main armhf libblockdev-utils3 armhf 3.3.0-1 [17.5 kB] 107s Get:263 http://ftpmaster.internal/ubuntu plucky/main armhf libnspr4 armhf 2:4.36-1ubuntu1 [94.5 kB] 107s Get:264 http://ftpmaster.internal/ubuntu plucky/main armhf libnss3 armhf 2:3.107-1ubuntu1 [1315 kB] 107s Get:265 http://ftpmaster.internal/ubuntu plucky/main armhf libgpgme11t64 armhf 1.24.1-4ubuntu1 [125 kB] 107s Get:266 http://ftpmaster.internal/ubuntu plucky/main armhf libvolume-key1 armhf 0.3.12-9 [39.1 kB] 107s Get:267 http://ftpmaster.internal/ubuntu plucky/main armhf libblockdev-crypto3 armhf 3.3.0-1 [22.4 kB] 107s Get:268 http://ftpmaster.internal/ubuntu plucky/main armhf libblockdev-fs3 armhf 3.3.0-1 [34.5 kB] 107s Get:269 http://ftpmaster.internal/ubuntu plucky/main armhf libblockdev-loop3 armhf 3.3.0-1 [6594 B] 107s Get:270 http://ftpmaster.internal/ubuntu plucky/main armhf libblockdev-mdraid3 armhf 3.3.0-1 [13.4 kB] 107s Get:271 http://ftpmaster.internal/ubuntu plucky/main armhf libnvme1t64 armhf 1.11.1-2 [73.6 kB] 107s Get:272 http://ftpmaster.internal/ubuntu plucky/main armhf libblockdev-nvme3 armhf 3.3.0-1 [17.7 kB] 107s Get:273 http://ftpmaster.internal/ubuntu plucky/main armhf libblockdev-part3 armhf 3.3.0-1 [16.6 kB] 107s Get:274 http://ftpmaster.internal/ubuntu plucky/main armhf libblockdev-swap3 armhf 3.3.0-1 [9010 B] 107s Get:275 http://ftpmaster.internal/ubuntu plucky/main armhf libblockdev3 armhf 3.3.0-1 [44.4 kB] 107s Get:276 http://ftpmaster.internal/ubuntu plucky/main armhf libftdi1-2 armhf 1.5-8 [26.3 kB] 107s Get:277 http://ftpmaster.internal/ubuntu plucky/main armhf libgstreamer1.0-0 armhf 1.25.50-1 [1164 kB] 107s Get:278 http://ftpmaster.internal/ubuntu plucky/main armhf libgudev-1.0-0 armhf 1:238-6 [13.7 kB] 107s Get:279 http://ftpmaster.internal/ubuntu plucky/main armhf libicu76 armhf 76.1-1ubuntu2 [10.8 MB] 107s Get:280 http://ftpmaster.internal/ubuntu plucky/main armhf libsasl2-modules armhf 2.1.28+dfsg1-8build1 [62.7 kB] 107s Get:281 http://ftpmaster.internal/ubuntu plucky/main armhf udisks2 armhf 2.10.1-11ubuntu2 [278 kB] 107s Get:282 http://ftpmaster.internal/ubuntu plucky/main armhf libudisks2-0 armhf 2.10.1-11ubuntu2 [142 kB] 107s Get:283 http://ftpmaster.internal/ubuntu plucky/main armhf libwrap0 armhf 7.6.q-35 [45.6 kB] 107s Get:284 http://ftpmaster.internal/ubuntu plucky/main armhf linux-headers-6.12.0-15 all 6.12.0-15.15 [14.1 MB] 108s Get:285 http://ftpmaster.internal/ubuntu plucky/main armhf linux-headers-6.12.0-15-generic armhf 6.12.0-15.15 [1414 kB] 108s Get:286 http://ftpmaster.internal/ubuntu plucky/main armhf linux-headers-generic armhf 6.12.0-15.15+1 [10.8 kB] 108s Get:287 http://ftpmaster.internal/ubuntu plucky/main armhf packagekit-tools armhf 1.3.0-3build1 [28.0 kB] 108s Get:288 http://ftpmaster.internal/ubuntu plucky/main armhf packagekit armhf 1.3.0-3build1 [431 kB] 108s Get:289 http://ftpmaster.internal/ubuntu plucky/main armhf pollinate all 4.33-4ubuntu2 [12.4 kB] 108s Get:290 http://ftpmaster.internal/ubuntu plucky/main armhf python3-babel all 2.17.0-1 [101 kB] 108s Get:291 http://ftpmaster.internal/ubuntu plucky/main armhf python-babel-localedata all 2.17.0-1 [6678 kB] 108s Get:292 http://ftpmaster.internal/ubuntu plucky/main armhf python3-certifi all 2025.1.31+ds-1 [9816 B] 108s Get:293 http://ftpmaster.internal/ubuntu plucky/main armhf python3-chardet all 5.2.0+dfsg-2 [116 kB] 108s Get:294 http://ftpmaster.internal/ubuntu plucky/main armhf python3-idna all 3.10-1 [47.4 kB] 108s Get:295 http://ftpmaster.internal/ubuntu plucky/main armhf python3-more-itertools all 10.6.0-1 [57.7 kB] 108s Get:296 http://ftpmaster.internal/ubuntu plucky/main armhf python3-openssl all 25.0.0-1 [46.1 kB] 108s Get:297 http://ftpmaster.internal/ubuntu plucky/main armhf python3-pkg-resources all 75.6.0-1 [144 kB] 108s Get:298 http://ftpmaster.internal/ubuntu plucky/main armhf python3-setuptools all 75.6.0-1 [645 kB] 108s Get:299 http://ftpmaster.internal/ubuntu plucky/main armhf software-properties-common all 0.108 [16.5 kB] 108s Get:300 http://ftpmaster.internal/ubuntu plucky/main armhf python3-software-properties all 0.108 [30.9 kB] 108s Get:301 http://ftpmaster.internal/ubuntu plucky/main armhf python3-urllib3 all 2.3.0-1 [94.0 kB] 108s Get:302 http://ftpmaster.internal/ubuntu plucky/main armhf python3-wadllib all 2.0.0-2 [36.2 kB] 108s Get:303 http://ftpmaster.internal/ubuntu plucky/main armhf unattended-upgrades all 2.12ubuntu2 [55.0 kB] 108s Get:304 http://ftpmaster.internal/ubuntu plucky/main armhf xfsprogs armhf 6.12.0-1ubuntu1 [958 kB] 109s Get:305 http://ftpmaster.internal/ubuntu plucky/main armhf zstd armhf 1.5.6+dfsg-2 [690 kB] 109s Get:306 http://ftpmaster.internal/ubuntu plucky/main armhf cloud-init all 25.1~3geb1965a4-0ubuntu1 [2102 B] 109s Get:307 http://ftpmaster.internal/ubuntu plucky/main armhf kpartx armhf 0.9.9-1ubuntu4 [35.0 kB] 109s Get:308 http://ftpmaster.internal/ubuntu plucky/main armhf multipath-tools armhf 0.9.9-1ubuntu4 [294 kB] 110s Preconfiguring packages ... 113s Fetched 133 MB in 8s (16.2 MB/s) 113s (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 ... 59970 files and directories currently installed.) 113s Preparing to unpack .../bash_5.2.37-1ubuntu1_armhf.deb ... 113s Unpacking bash (5.2.37-1ubuntu1) over (5.2.32-1ubuntu2) ... 113s Setting up bash (5.2.37-1ubuntu1) ... 113s update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode 113s (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 ... 59970 files and directories currently installed.) 113s Preparing to unpack .../bsdutils_1%3a2.40.2-14ubuntu1_armhf.deb ... 113s Unpacking bsdutils (1:2.40.2-14ubuntu1) over (1:2.40.2-1ubuntu1) ... 113s Setting up bsdutils (1:2.40.2-14ubuntu1) ... 113s (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 ... 59970 files and directories currently installed.) 113s Preparing to unpack .../coreutils_9.5-1ubuntu1_armhf.deb ... 113s Unpacking coreutils (9.5-1ubuntu1) over (9.4-3.1ubuntu1) ... 113s Setting up coreutils (9.5-1ubuntu1) ... 114s (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 ... 59970 files and directories currently installed.) 114s Preparing to unpack .../dash_0.5.12-12ubuntu1_armhf.deb ... 114s Unpacking dash (0.5.12-12ubuntu1) over (0.5.12-9ubuntu1) ... 114s Setting up dash (0.5.12-12ubuntu1) ... 114s (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 ... 59970 files and directories currently installed.) 114s Preparing to unpack .../diffutils_1%3a3.10-2_armhf.deb ... 114s Unpacking diffutils (1:3.10-2) over (1:3.10-1build1) ... 114s Setting up diffutils (1:3.10-2) ... 114s Selecting previously unselected package gcc-15-base:armhf. 114s (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 ... 59970 files and directories currently installed.) 114s Preparing to unpack .../gcc-15-base_15-20250213-1ubuntu1_armhf.deb ... 114s Unpacking gcc-15-base:armhf (15-20250213-1ubuntu1) ... 114s Setting up gcc-15-base:armhf (15-20250213-1ubuntu1) ... 114s (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 ... 59975 files and directories currently installed.) 114s Preparing to unpack .../libgcc-s1_15-20250213-1ubuntu1_armhf.deb ... 114s Unpacking libgcc-s1:armhf (15-20250213-1ubuntu1) over (14.2.0-8ubuntu1) ... 114s Setting up libgcc-s1:armhf (15-20250213-1ubuntu1) ... 114s (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 ... 59975 files and directories currently installed.) 114s Preparing to unpack .../libc6_2.40-4ubuntu1_armhf.deb ... 114s Unpacking libc6:armhf (2.40-4ubuntu1) over (2.40-1ubuntu3) ... 115s Setting up libc6:armhf (2.40-4ubuntu1) ... 115s (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 ... 59975 files and directories currently installed.) 115s Preparing to unpack .../libxxhash0_0.8.3-2_armhf.deb ... 115s Unpacking libxxhash0:armhf (0.8.3-2) over (0.8.2-2build1) ... 115s Setting up libxxhash0:armhf (0.8.3-2) ... 115s (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 ... 59975 files and directories currently installed.) 115s Preparing to unpack .../liblz4-1_1.10.0-3_armhf.deb ... 115s Unpacking liblz4-1:armhf (1.10.0-3) over (1.9.4-3) ... 115s Setting up liblz4-1:armhf (1.10.0-3) ... 115s (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 ... 59975 files and directories currently installed.) 115s Preparing to unpack .../libssl3t64_3.4.0-1ubuntu2_armhf.deb ... 115s Unpacking libssl3t64:armhf (3.4.0-1ubuntu2) over (3.3.1-2ubuntu2) ... 115s Selecting previously unselected package openssl-provider-legacy. 115s Preparing to unpack .../openssl-provider-legacy_3.4.0-1ubuntu2_armhf.deb ... 115s Unpacking openssl-provider-legacy (3.4.0-1ubuntu2) ... 115s Setting up libssl3t64:armhf (3.4.0-1ubuntu2) ... 115s Setting up openssl-provider-legacy (3.4.0-1ubuntu2) ... 116s (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 ... 59978 files and directories currently installed.) 116s Preparing to unpack .../libzstd1_1.5.6+dfsg-2_armhf.deb ... 116s Unpacking libzstd1:armhf (1.5.6+dfsg-2) over (1.5.6+dfsg-1) ... 116s Setting up libzstd1:armhf (1.5.6+dfsg-2) ... 116s (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 ... 59978 files and directories currently installed.) 116s Preparing to unpack .../libstdc++6_15-20250213-1ubuntu1_armhf.deb ... 116s Unpacking libstdc++6:armhf (15-20250213-1ubuntu1) over (14.2.0-8ubuntu1) ... 116s Setting up libstdc++6:armhf (15-20250213-1ubuntu1) ... 116s (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 ... 59978 files and directories currently installed.) 116s Preparing to unpack .../0-systemd-timesyncd_257.2-3ubuntu1_armhf.deb ... 116s Unpacking systemd-timesyncd (257.2-3ubuntu1) over (256.5-2ubuntu4) ... 116s Preparing to unpack .../1-dbus-session-bus-common_1.16.0-1ubuntu1_all.deb ... 116s Unpacking dbus-session-bus-common (1.16.0-1ubuntu1) over (1.14.10-4ubuntu5) ... 116s Preparing to unpack .../2-systemd-sysv_257.2-3ubuntu1_armhf.deb ... 116s Unpacking systemd-sysv (257.2-3ubuntu1) over (256.5-2ubuntu4) ... 116s Preparing to unpack .../3-libpam-systemd_257.2-3ubuntu1_armhf.deb ... 116s Unpacking libpam-systemd:armhf (257.2-3ubuntu1) over (256.5-2ubuntu4) ... 116s Preparing to unpack .../4-dbus-user-session_1.16.0-1ubuntu1_armhf.deb ... 116s Unpacking dbus-user-session (1.16.0-1ubuntu1) over (1.14.10-4ubuntu5) ... 116s Preparing to unpack .../5-libapparmor1_4.1.0~beta1-0ubuntu5_armhf.deb ... 116s Unpacking libapparmor1:armhf (4.1.0~beta1-0ubuntu5) over (4.1.0~beta1-0ubuntu4) ... 116s Preparing to unpack .../6-libcap-ng0_0.8.5-4_armhf.deb ... 116s Unpacking libcap-ng0:armhf (0.8.5-4) over (0.8.5-3build1) ... 116s Setting up libcap-ng0:armhf (0.8.5-4) ... 116s (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 ... 59979 files and directories currently installed.) 116s Preparing to unpack .../libselinux1_3.7-3ubuntu2_armhf.deb ... 116s Unpacking libselinux1:armhf (3.7-3ubuntu2) over (3.7-3ubuntu1) ... 116s Setting up libselinux1:armhf (3.7-3ubuntu2) ... 117s (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 ... 59979 files and directories currently installed.) 117s Preparing to unpack .../0-dbus-system-bus-common_1.16.0-1ubuntu1_all.deb ... 117s Unpacking dbus-system-bus-common (1.16.0-1ubuntu1) over (1.14.10-4ubuntu5) ... 117s Preparing to unpack .../1-dbus-bin_1.16.0-1ubuntu1_armhf.deb ... 117s Unpacking dbus-bin (1.16.0-1ubuntu1) over (1.14.10-4ubuntu5) ... 117s Preparing to unpack .../2-dbus_1.16.0-1ubuntu1_armhf.deb ... 117s Unpacking dbus (1.16.0-1ubuntu1) over (1.14.10-4ubuntu5) ... 117s Preparing to unpack .../3-dbus-daemon_1.16.0-1ubuntu1_armhf.deb ... 117s Unpacking dbus-daemon (1.16.0-1ubuntu1) over (1.14.10-4ubuntu5) ... 117s Preparing to unpack .../4-libdbus-1-3_1.16.0-1ubuntu1_armhf.deb ... 117s Unpacking libdbus-1-3:armhf (1.16.0-1ubuntu1) over (1.14.10-4ubuntu5) ... 117s Preparing to unpack .../5-systemd-resolved_257.2-3ubuntu1_armhf.deb ... 117s Unpacking systemd-resolved (257.2-3ubuntu1) over (256.5-2ubuntu4) ... 117s Preparing to unpack .../6-systemd-cryptsetup_257.2-3ubuntu1_armhf.deb ... 117s Unpacking systemd-cryptsetup (257.2-3ubuntu1) over (256.5-2ubuntu4) ... 117s Preparing to unpack .../7-libncurses6_6.5+20250125-2_armhf.deb ... 117s Unpacking libncurses6:armhf (6.5+20250125-2) over (6.5-2) ... 117s Preparing to unpack .../8-libncursesw6_6.5+20250125-2_armhf.deb ... 117s Unpacking libncursesw6:armhf (6.5+20250125-2) over (6.5-2) ... 117s Preparing to unpack .../9-libtinfo6_6.5+20250125-2_armhf.deb ... 117s Unpacking libtinfo6:armhf (6.5+20250125-2) over (6.5-2) ... 117s Setting up libtinfo6:armhf (6.5+20250125-2) ... 117s (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 ... 59979 files and directories currently installed.) 117s Preparing to unpack .../bsdextrautils_2.40.2-14ubuntu1_armhf.deb ... 117s Unpacking bsdextrautils (2.40.2-14ubuntu1) over (2.40.2-1ubuntu1) ... 117s Preparing to unpack .../eject_2.40.2-14ubuntu1_armhf.deb ... 117s Unpacking eject (2.40.2-14ubuntu1) over (2.40.2-1ubuntu1) ... 117s Preparing to unpack .../fdisk_2.40.2-14ubuntu1_armhf.deb ... 117s Unpacking fdisk (2.40.2-14ubuntu1) over (2.40.2-1ubuntu1) ... 117s Preparing to unpack .../libblkid1_2.40.2-14ubuntu1_armhf.deb ... 117s Unpacking libblkid1:armhf (2.40.2-14ubuntu1) over (2.40.2-1ubuntu1) ... 118s Setting up libblkid1:armhf (2.40.2-14ubuntu1) ... 118s (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 ... 59975 files and directories currently installed.) 118s Preparing to unpack .../libmount1_2.40.2-14ubuntu1_armhf.deb ... 118s Unpacking libmount1:armhf (2.40.2-14ubuntu1) over (2.40.2-1ubuntu1) ... 118s Setting up libmount1:armhf (2.40.2-14ubuntu1) ... 118s (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 ... 59975 files and directories currently installed.) 118s Preparing to unpack .../libsmartcols1_2.40.2-14ubuntu1_armhf.deb ... 118s Unpacking libsmartcols1:armhf (2.40.2-14ubuntu1) over (2.40.2-1ubuntu1) ... 118s Setting up libsmartcols1:armhf (2.40.2-14ubuntu1) ... 118s (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 ... 59975 files and directories currently installed.) 118s Preparing to unpack .../libuuid1_2.40.2-14ubuntu1_armhf.deb ... 118s Unpacking libuuid1:armhf (2.40.2-14ubuntu1) over (2.40.2-1ubuntu1) ... 118s Setting up libuuid1:armhf (2.40.2-14ubuntu1) ... 118s (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 ... 59975 files and directories currently installed.) 118s Preparing to unpack .../util-linux_2.40.2-14ubuntu1_armhf.deb ... 118s Unpacking util-linux (2.40.2-14ubuntu1) over (2.40.2-1ubuntu1) ... 118s Setting up util-linux (2.40.2-14ubuntu1) ... 119s fstrim.service is a disabled or a static unit not running, not starting it. 119s (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 ... 59968 files and directories currently installed.) 119s Preparing to unpack .../0-uuid-runtime_2.40.2-14ubuntu1_armhf.deb ... 119s Unpacking uuid-runtime (2.40.2-14ubuntu1) over (2.40.2-1ubuntu1) ... 119s Preparing to unpack .../1-libfdisk1_2.40.2-14ubuntu1_armhf.deb ... 119s Unpacking libfdisk1:armhf (2.40.2-14ubuntu1) over (2.40.2-1ubuntu1) ... 120s Preparing to unpack .../2-mount_2.40.2-14ubuntu1_armhf.deb ... 120s Unpacking mount (2.40.2-14ubuntu1) over (2.40.2-1ubuntu1) ... 120s Preparing to unpack .../3-readline-common_8.2-6_all.deb ... 120s Unpacking readline-common (8.2-6) over (8.2-5) ... 120s Preparing to unpack .../4-libreadline8t64_8.2-6_armhf.deb ... 120s Leaving 'diversion of /lib/arm-linux-gnueabihf/libhistory.so.8 to /lib/arm-linux-gnueabihf/libhistory.so.8.usr-is-merged by libreadline8t64' 120s Leaving 'diversion of /lib/arm-linux-gnueabihf/libhistory.so.8.2 to /lib/arm-linux-gnueabihf/libhistory.so.8.2.usr-is-merged by libreadline8t64' 120s Leaving 'diversion of /lib/arm-linux-gnueabihf/libreadline.so.8 to /lib/arm-linux-gnueabihf/libreadline.so.8.usr-is-merged by libreadline8t64' 120s Leaving 'diversion of /lib/arm-linux-gnueabihf/libreadline.so.8.2 to /lib/arm-linux-gnueabihf/libreadline.so.8.2.usr-is-merged by libreadline8t64' 120s Unpacking libreadline8t64:armhf (8.2-6) over (8.2-5) ... 120s Preparing to unpack .../5-libcrypt1_1%3a4.4.38-1_armhf.deb ... 120s Unpacking libcrypt1:armhf (1:4.4.38-1) over (1:4.4.36-5) ... 120s Setting up libcrypt1:armhf (1:4.4.38-1) ... 120s (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 ... 59968 files and directories currently installed.) 120s Preparing to unpack .../libsystemd-shared_257.2-3ubuntu1_armhf.deb ... 120s Unpacking libsystemd-shared:armhf (257.2-3ubuntu1) over (256.5-2ubuntu4) ... 120s Setting up libsystemd-shared:armhf (257.2-3ubuntu1) ... 120s (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 ... 59968 files and directories currently installed.) 120s Preparing to unpack .../systemd_257.2-3ubuntu1_armhf.deb ... 120s Unpacking systemd (257.2-3ubuntu1) over (256.5-2ubuntu4) ... 121s Preparing to unpack .../udev_257.2-3ubuntu1_armhf.deb ... 121s Unpacking udev (257.2-3ubuntu1) over (256.5-2ubuntu4) ... 121s Preparing to unpack .../libnss-systemd_257.2-3ubuntu1_armhf.deb ... 121s Unpacking libnss-systemd:armhf (257.2-3ubuntu1) over (256.5-2ubuntu4) ... 121s Preparing to unpack .../libudev1_257.2-3ubuntu1_armhf.deb ... 121s Unpacking libudev1:armhf (257.2-3ubuntu1) over (256.5-2ubuntu4) ... 121s Setting up libudev1:armhf (257.2-3ubuntu1) ... 121s (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 ... 59962 files and directories currently installed.) 121s Preparing to unpack .../libsystemd0_257.2-3ubuntu1_armhf.deb ... 121s Unpacking libsystemd0:armhf (257.2-3ubuntu1) over (256.5-2ubuntu4) ... 121s Setting up libsystemd0:armhf (257.2-3ubuntu1) ... 121s (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 ... 59962 files and directories currently installed.) 121s Preparing to unpack .../libapt-pkg6.0t64_2.9.29_armhf.deb ... 121s Unpacking libapt-pkg6.0t64:armhf (2.9.29) over (2.9.14ubuntu1) ... 121s Setting up libapt-pkg6.0t64:armhf (2.9.29) ... 121s (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 ... 59962 files and directories currently installed.) 121s Preparing to unpack .../tar_1.35+dfsg-3.1_armhf.deb ... 121s Unpacking tar (1.35+dfsg-3.1) over (1.35+dfsg-3build1) ... 121s Setting up tar (1.35+dfsg-3.1) ... 122s (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 ... 59962 files and directories currently installed.) 122s Preparing to unpack .../dpkg_1.22.11ubuntu4_armhf.deb ... 122s Unpacking dpkg (1.22.11ubuntu4) over (1.22.11ubuntu3) ... 122s Setting up dpkg (1.22.11ubuntu4) ... 122s (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 ... 59962 files and directories currently installed.) 122s Preparing to unpack .../gzip_1.13-1ubuntu2_armhf.deb ... 122s Unpacking gzip (1.13-1ubuntu2) over (1.12-1.1ubuntu1) ... 123s Setting up gzip (1.13-1ubuntu2) ... 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 ... 59962 files and directories currently installed.) 123s Preparing to unpack .../ncurses-bin_6.5+20250125-2_armhf.deb ... 123s Unpacking ncurses-bin (6.5+20250125-2) over (6.5-2) ... 123s Setting up ncurses-bin (6.5+20250125-2) ... 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 ... 59962 files and directories currently installed.) 123s Preparing to unpack .../libdebconfclient0_0.274ubuntu1_armhf.deb ... 123s Unpacking libdebconfclient0:armhf (0.274ubuntu1) over (0.272ubuntu1) ... 123s Setting up libdebconfclient0:armhf (0.274ubuntu1) ... 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 ... 59962 files and directories currently installed.) 123s Preparing to unpack .../base-passwd_3.6.6_armhf.deb ... 123s Unpacking base-passwd (3.6.6) over (3.6.5) ... 123s Setting up base-passwd (3.6.6) ... 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 ... 59962 files and directories currently installed.) 123s Preparing to unpack .../init-system-helpers_1.68_all.deb ... 123s Unpacking init-system-helpers (1.68) over (1.67ubuntu1) ... 123s Setting up init-system-helpers (1.68) ... 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 ... 59962 files and directories currently installed.) 123s Preparing to unpack .../libc-bin_2.40-4ubuntu1_armhf.deb ... 123s Unpacking libc-bin (2.40-4ubuntu1) over (2.40-1ubuntu3) ... 124s Setting up libc-bin (2.40-4ubuntu1) ... 124s (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 ... 59962 files and directories currently installed.) 124s Preparing to unpack .../ncurses-base_6.5+20250125-2_all.deb ... 124s Unpacking ncurses-base (6.5+20250125-2) over (6.5-2) ... 124s Setting up ncurses-base (6.5+20250125-2) ... 124s (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 ... 59962 files and directories currently installed.) 124s Preparing to unpack .../ncurses-term_6.5+20250125-2_all.deb ... 124s Unpacking ncurses-term (6.5+20250125-2) over (6.5-2) ... 125s Selecting previously unselected package libapt-pkg7.0:armhf. 125s Preparing to unpack .../libapt-pkg7.0_2.9.30_armhf.deb ... 125s Unpacking libapt-pkg7.0:armhf (2.9.30) ... 125s Setting up libapt-pkg7.0:armhf (2.9.30) ... 125s (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 ... 60019 files and directories currently installed.) 125s Preparing to unpack .../archives/apt_2.9.30_armhf.deb ... 125s Unpacking apt (2.9.30) over (2.9.14ubuntu1) ... 125s Setting up apt (2.9.30) ... 126s (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 ... 60021 files and directories currently installed.) 126s Preparing to unpack .../apt-utils_2.9.30_armhf.deb ... 126s Unpacking apt-utils (2.9.30) over (2.9.14ubuntu1) ... 126s Preparing to unpack .../libgpg-error-l10n_1.51-3_all.deb ... 126s Unpacking libgpg-error-l10n (1.51-3) over (1.50-4) ... 126s Preparing to unpack .../libgpg-error0_1.51-3_armhf.deb ... 126s Unpacking libgpg-error0:armhf (1.51-3) over (1.50-4) ... 126s Setting up libgpg-error0:armhf (1.51-3) ... 126s (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 ... 60021 files and directories currently installed.) 126s Preparing to unpack .../libnpth0t64_1.8-2_armhf.deb ... 126s Unpacking libnpth0t64:armhf (1.8-2) over (1.6-3.1build1) ... 127s Setting up libnpth0t64:armhf (1.8-2) ... 127s (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 ... 60021 files and directories currently installed.) 127s Preparing to unpack .../00-gpg-wks-client_2.4.4-2ubuntu22_armhf.deb ... 127s Unpacking gpg-wks-client (2.4.4-2ubuntu22) over (2.4.4-2ubuntu18) ... 127s Preparing to unpack .../01-dirmngr_2.4.4-2ubuntu22_armhf.deb ... 127s Unpacking dirmngr (2.4.4-2ubuntu22) over (2.4.4-2ubuntu18) ... 127s Preparing to unpack .../02-gpgsm_2.4.4-2ubuntu22_armhf.deb ... 127s Unpacking gpgsm (2.4.4-2ubuntu22) over (2.4.4-2ubuntu18) ... 127s Preparing to unpack .../03-gnupg-utils_2.4.4-2ubuntu22_armhf.deb ... 127s Unpacking gnupg-utils (2.4.4-2ubuntu22) over (2.4.4-2ubuntu18) ... 127s Preparing to unpack .../04-gpg-agent_2.4.4-2ubuntu22_armhf.deb ... 127s Unpacking gpg-agent (2.4.4-2ubuntu22) over (2.4.4-2ubuntu18) ... 127s Preparing to unpack .../05-gpg_2.4.4-2ubuntu22_armhf.deb ... 127s Unpacking gpg (2.4.4-2ubuntu22) over (2.4.4-2ubuntu18) ... 127s Preparing to unpack .../06-gpgconf_2.4.4-2ubuntu22_armhf.deb ... 127s Unpacking gpgconf (2.4.4-2ubuntu22) over (2.4.4-2ubuntu18) ... 127s Preparing to unpack .../07-gnupg_2.4.4-2ubuntu22_all.deb ... 127s Unpacking gnupg (2.4.4-2ubuntu22) over (2.4.4-2ubuntu18) ... 127s Preparing to unpack .../08-keyboxd_2.4.4-2ubuntu22_armhf.deb ... 127s Unpacking keyboxd (2.4.4-2ubuntu22) over (2.4.4-2ubuntu18) ... 127s Preparing to unpack .../09-pinentry-curses_1.3.1-2ubuntu2_armhf.deb ... 127s Unpacking pinentry-curses (1.3.1-2ubuntu2) over (1.3.1-0ubuntu2) ... 127s Preparing to unpack .../10-libnettle8t64_3.10.1-1_armhf.deb ... 127s Unpacking libnettle8t64:armhf (3.10.1-1) over (3.10-1) ... 127s Setting up libnettle8t64:armhf (3.10.1-1) ... 128s (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 ... 60021 files and directories currently installed.) 128s Preparing to unpack .../libhogweed6t64_3.10.1-1_armhf.deb ... 128s Unpacking libhogweed6t64:armhf (3.10.1-1) over (3.10-1) ... 128s Setting up libhogweed6t64:armhf (3.10.1-1) ... 128s (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 ... 60021 files and directories currently installed.) 128s Preparing to unpack .../libffi8_3.4.7-1_armhf.deb ... 128s Unpacking libffi8:armhf (3.4.7-1) over (3.4.6-1build1) ... 128s Setting up libffi8:armhf (3.4.7-1) ... 128s (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 ... 60021 files and directories currently installed.) 128s Preparing to unpack .../libp11-kit0_0.25.5-2ubuntu2_armhf.deb ... 128s Unpacking libp11-kit0:armhf (0.25.5-2ubuntu2) over (0.25.5-2ubuntu1) ... 128s Setting up libp11-kit0:armhf (0.25.5-2ubuntu2) ... 128s (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 ... 60021 files and directories currently installed.) 128s Preparing to unpack .../libtasn1-6_4.20.0-2_armhf.deb ... 128s Unpacking libtasn1-6:armhf (4.20.0-2) over (4.19.0-3build1) ... 128s Setting up libtasn1-6:armhf (4.20.0-2) ... 128s (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 ... 60021 files and directories currently installed.) 128s Preparing to unpack .../libunistring5_1.3-1_armhf.deb ... 128s Unpacking libunistring5:armhf (1.3-1) over (1.2-1) ... 128s Setting up libunistring5:armhf (1.3-1) ... 128s (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 ... 60021 files and directories currently installed.) 128s Preparing to unpack .../libgnutls30t64_3.8.9-2ubuntu1_armhf.deb ... 128s Unpacking libgnutls30t64:armhf (3.8.9-2ubuntu1) over (3.8.8-2ubuntu1) ... 128s Setting up libgnutls30t64:armhf (3.8.9-2ubuntu1) ... 128s (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 ... 60021 files and directories currently installed.) 128s Preparing to unpack .../libsasl2-modules-db_2.1.28+dfsg1-8build1_armhf.deb ... 128s Unpacking libsasl2-modules-db:armhf (2.1.28+dfsg1-8build1) over (2.1.28+dfsg1-8) ... 129s Preparing to unpack .../libsasl2-2_2.1.28+dfsg1-8build1_armhf.deb ... 129s Unpacking libsasl2-2:armhf (2.1.28+dfsg1-8build1) over (2.1.28+dfsg1-8) ... 129s Preparing to unpack .../libldap-common_2.6.9+dfsg-1~exp2ubuntu1_all.deb ... 129s Unpacking libldap-common (2.6.9+dfsg-1~exp2ubuntu1) over (2.6.8+dfsg-1~exp4ubuntu3) ... 129s Preparing to unpack .../libldap2_2.6.9+dfsg-1~exp2ubuntu1_armhf.deb ... 129s Unpacking libldap2:armhf (2.6.9+dfsg-1~exp2ubuntu1) over (2.6.8+dfsg-1~exp4ubuntu3) ... 129s Preparing to unpack .../gpgv_2.4.4-2ubuntu22_armhf.deb ... 129s Unpacking gpgv (2.4.4-2ubuntu22) over (2.4.4-2ubuntu18) ... 129s Setting up gpgv (2.4.4-2ubuntu22) ... 129s (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 ... 60020 files and directories currently installed.) 129s Preparing to unpack .../0-e2fsprogs-l10n_1.47.2-1ubuntu1_all.deb ... 129s Unpacking e2fsprogs-l10n (1.47.2-1ubuntu1) over (1.47.1-1ubuntu1) ... 129s Preparing to unpack .../1-logsave_1.47.2-1ubuntu1_armhf.deb ... 129s Unpacking logsave (1.47.2-1ubuntu1) over (1.47.1-1ubuntu1) ... 129s Preparing to unpack .../2-ubuntu-minimal_1.547_armhf.deb ... 129s Unpacking ubuntu-minimal (1.547) over (1.544) ... 129s Preparing to unpack .../3-initramfs-tools_0.145ubuntu2_all.deb ... 129s Unpacking initramfs-tools (0.145ubuntu2) over (0.142ubuntu35) ... 129s Preparing to unpack .../4-initramfs-tools-core_0.145ubuntu2_all.deb ... 129s Unpacking initramfs-tools-core (0.145ubuntu2) over (0.142ubuntu35) ... 129s Preparing to unpack .../5-libext2fs2t64_1.47.2-1ubuntu1_armhf.deb ... 129s Leaving 'diversion of /lib/arm-linux-gnueabihf/libe2p.so.2 to /lib/arm-linux-gnueabihf/libe2p.so.2.usr-is-merged by libext2fs2t64' 129s Leaving 'diversion of /lib/arm-linux-gnueabihf/libe2p.so.2.3 to /lib/arm-linux-gnueabihf/libe2p.so.2.3.usr-is-merged by libext2fs2t64' 129s Leaving 'diversion of /lib/arm-linux-gnueabihf/libext2fs.so.2 to /lib/arm-linux-gnueabihf/libext2fs.so.2.usr-is-merged by libext2fs2t64' 129s Leaving 'diversion of /lib/arm-linux-gnueabihf/libext2fs.so.2.4 to /lib/arm-linux-gnueabihf/libext2fs.so.2.4.usr-is-merged by libext2fs2t64' 129s Unpacking libext2fs2t64:armhf (1.47.2-1ubuntu1) over (1.47.1-1ubuntu1) ... 129s Setting up libext2fs2t64:armhf (1.47.2-1ubuntu1) ... 129s (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 ... 60020 files and directories currently installed.) 129s Preparing to unpack .../e2fsprogs_1.47.2-1ubuntu1_armhf.deb ... 129s Unpacking e2fsprogs (1.47.2-1ubuntu1) over (1.47.1-1ubuntu1) ... 130s Preparing to unpack .../console-setup-linux_1.226ubuntu3_all.deb ... 130s Unpacking console-setup-linux (1.226ubuntu3) over (1.226ubuntu2) ... 130s Preparing to unpack .../console-setup_1.226ubuntu3_all.deb ... 130s Unpacking console-setup (1.226ubuntu3) over (1.226ubuntu2) ... 130s Preparing to unpack .../keyboard-configuration_1.226ubuntu3_all.deb ... 130s Unpacking keyboard-configuration (1.226ubuntu3) over (1.226ubuntu2) ... 130s Preparing to unpack .../dhcpcd-base_1%3a10.1.0-7_armhf.deb ... 130s Unpacking dhcpcd-base (1:10.1.0-7) over (1:10.1.0-2) ... 130s Setting up libapparmor1:armhf (4.1.0~beta1-0ubuntu5) ... 130s Setting up mount (2.40.2-14ubuntu1) ... 130s Setting up systemd (257.2-3ubuntu1) ... 130s Installing new version of config file /etc/systemd/logind.conf ... 130s Installing new version of config file /etc/systemd/sleep.conf ... 130s /usr/lib/tmpfiles.d/legacy.conf:14: Duplicate line for path "/run/lock", ignoring. 130s Created symlink '/run/systemd/system/tmp.mount' → '/dev/null'. 130s /usr/lib/tmpfiles.d/legacy.conf:14: Duplicate line for path "/run/lock", ignoring. 131s Setting up systemd-sysv (257.2-3ubuntu1) ... 131s (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 ... 60019 files and directories currently installed.) 131s Preparing to unpack .../archives/init_1.68_armhf.deb ... 131s Unpacking init (1.68) over (1.67ubuntu1) ... 131s Preparing to unpack .../iputils-ping_3%3a20240905-1ubuntu1_armhf.deb ... 131s Unpacking iputils-ping (3:20240905-1ubuntu1) over (3:20240117-1build1) ... 131s Preparing to unpack .../locales_2.40-4ubuntu1_all.deb ... 131s Unpacking locales (2.40-4ubuntu1) over (2.40-1ubuntu3) ... 132s Selecting previously unselected package login.defs. 132s Preparing to unpack .../login.defs_1%3a4.16.0-7ubuntu1_all.deb ... 132s Unpacking login.defs (1:4.16.0-7ubuntu1) ... 132s Replacing files in old package login (1:4.15.3-3ubuntu2) ... 132s Setting up login.defs (1:4.16.0-7ubuntu1) ... 132s Installing new version of config file /etc/login.defs ... 132s (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 ... 60023 files and directories currently installed.) 132s Preparing to unpack .../0-login_1%3a4.16.0-2+really2.40.2-14ubuntu1_armhf.deb ... 132s Unpacking login (1:4.16.0-2+really2.40.2-14ubuntu1) over (1:4.15.3-3ubuntu2) ... 132s Preparing to unpack .../1-mawk_1.3.4.20250131-1_armhf.deb ... 132s Unpacking mawk (1.3.4.20250131-1) over (1.3.4.20240905-1) ... 132s Preparing to unpack .../2-netcat-openbsd_1.228-1_armhf.deb ... 132s Unpacking netcat-openbsd (1.228-1) over (1.226-1.1) ... 132s Selecting previously unselected package libpython3.13-minimal:armhf. 132s Preparing to unpack .../3-libpython3.13-minimal_3.13.2-1_armhf.deb ... 132s Unpacking libpython3.13-minimal:armhf (3.13.2-1) ... 132s Selecting previously unselected package python3.13-minimal. 132s Preparing to unpack .../4-python3.13-minimal_3.13.2-1_armhf.deb ... 132s Unpacking python3.13-minimal (3.13.2-1) ... 133s Preparing to unpack .../5-python3-cryptography_43.0.0-1_armhf.deb ... 133s Unpacking python3-cryptography (43.0.0-1) over (42.0.5-2build1) ... 133s Setting up libpython3.13-minimal:armhf (3.13.2-1) ... 133s Setting up python3.13-minimal (3.13.2-1) ... 134s (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 ... 60305 files and directories currently installed.) 134s Preparing to unpack .../python3-minimal_3.13.1-1~exp2_armhf.deb ... 134s Unpacking python3-minimal (3.13.1-1~exp2) over (3.12.6-0ubuntu1) ... 134s Setting up python3-minimal (3.13.1-1~exp2) ... 135s (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 ... 60305 files and directories currently installed.) 135s Preparing to unpack .../00-python3_3.13.1-1~exp2_armhf.deb ... 135s Unpacking python3 (3.13.1-1~exp2) over (3.12.6-0ubuntu1) ... 135s Selecting previously unselected package python3-bcrypt. 135s Preparing to unpack .../01-python3-bcrypt_4.2.0-2.1_armhf.deb ... 135s Unpacking python3-bcrypt (4.2.0-2.1) ... 135s Preparing to unpack .../02-tzdata_2025a-2ubuntu1_all.deb ... 135s Unpacking tzdata (2025a-2ubuntu1) over (2024b-1ubuntu2) ... 135s Selecting previously unselected package libpython3.13-stdlib:armhf. 135s Preparing to unpack .../03-libpython3.13-stdlib_3.13.2-1_armhf.deb ... 135s Unpacking libpython3.13-stdlib:armhf (3.13.2-1) ... 135s Selecting previously unselected package python3.13. 135s Preparing to unpack .../04-python3.13_3.13.2-1_armhf.deb ... 135s Unpacking python3.13 (3.13.2-1) ... 135s Preparing to unpack .../05-libpython3-stdlib_3.13.1-1~exp2_armhf.deb ... 135s Unpacking libpython3-stdlib:armhf (3.13.1-1~exp2) over (3.12.6-0ubuntu1) ... 135s Preparing to unpack .../06-gir1.2-girepository-2.0_1.82.0-4_armhf.deb ... 135s Unpacking gir1.2-girepository-2.0:armhf (1.82.0-4) over (1.82.0-2) ... 136s Preparing to unpack .../07-gir1.2-glib-2.0_2.83.3-2_armhf.deb ... 136s Unpacking gir1.2-glib-2.0:armhf (2.83.3-2) over (2.82.2-3) ... 136s Preparing to unpack .../08-libgirepository-1.0-1_1.82.0-4_armhf.deb ... 136s Unpacking libgirepository-1.0-1:armhf (1.82.0-4) over (1.82.0-2) ... 136s Preparing to unpack .../09-libglib2.0-data_2.83.3-2_all.deb ... 136s Unpacking libglib2.0-data (2.83.3-2) over (2.82.2-3) ... 136s Preparing to unpack .../10-libglib2.0-bin_2.83.3-2_armhf.deb ... 136s Unpacking libglib2.0-bin (2.83.3-2) over (2.82.2-3) ... 136s Preparing to unpack .../11-libatomic1_15-20250213-1ubuntu1_armhf.deb ... 136s Unpacking libatomic1:armhf (15-20250213-1ubuntu1) over (14.2.0-8ubuntu1) ... 136s Preparing to unpack .../12-libglib2.0-0t64_2.83.3-2_armhf.deb ... 136s Unpacking libglib2.0-0t64:armhf (2.83.3-2) over (2.82.2-3) ... 136s Preparing to unpack .../13-netplan-generator_1.1.2-2ubuntu1_armhf.deb ... 136s Adding 'diversion of /lib/systemd/system-generators/netplan to /lib/systemd/system-generators/netplan.usr-is-merged by netplan-generator' 136s Unpacking netplan-generator (1.1.2-2ubuntu1) over (1.1.1-1) ... 136s Preparing to unpack .../14-libyaml-0-2_0.2.5-2_armhf.deb ... 136s Unpacking libyaml-0-2:armhf (0.2.5-2) over (0.2.5-1build1) ... 136s Preparing to unpack .../15-python3-netplan_1.1.2-2ubuntu1_armhf.deb ... 136s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 136s for fn in glob1(directory, "%s.*" % fname): 136s Unpacking python3-netplan (1.1.2-2ubuntu1) over (1.1.1-1) ... 136s Preparing to unpack .../16-netplan.io_1.1.2-2ubuntu1_armhf.deb ... 136s Unpacking netplan.io (1.1.2-2ubuntu1) over (1.1.1-1) ... 136s Preparing to unpack .../17-libnetplan1_1.1.2-2ubuntu1_armhf.deb ... 136s Unpacking libnetplan1:armhf (1.1.2-2ubuntu1) over (1.1.1-1) ... 136s Preparing to unpack .../18-ethtool_1%3a6.11-1_armhf.deb ... 136s Unpacking ethtool (1:6.11-1) over (1:6.10-1) ... 137s Preparing to unpack .../19-libsemanage-common_3.7-2.1_all.deb ... 137s Unpacking libsemanage-common (3.7-2.1) over (3.7-2build1) ... 137s Setting up libsemanage-common (3.7-2.1) ... 137s (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 ... 60728 files and directories currently installed.) 137s Preparing to unpack .../libsemanage2_3.7-2.1_armhf.deb ... 137s Unpacking libsemanage2:armhf (3.7-2.1) over (3.7-2build1) ... 137s Setting up libsemanage2:armhf (3.7-2.1) ... 137s (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 ... 60728 files and directories currently installed.) 137s Preparing to unpack .../passwd_1%3a4.16.0-7ubuntu1_armhf.deb ... 137s Unpacking passwd (1:4.16.0-7ubuntu1) over (1:4.15.3-3ubuntu2) ... 137s Setting up passwd (1:4.16.0-7ubuntu1) ... 137s (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 ... 60763 files and directories currently installed.) 137s Preparing to unpack .../000-python3-newt_0.52.24-4ubuntu1_armhf.deb ... 137s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 137s for fn in glob1(directory, "%s.*" % fname): 137s Unpacking python3-newt:armhf (0.52.24-4ubuntu1) over (0.52.24-2ubuntu4) ... 137s Preparing to unpack .../001-libnewt0.52_0.52.24-4ubuntu1_armhf.deb ... 137s Unpacking libnewt0.52:armhf (0.52.24-4ubuntu1) over (0.52.24-2ubuntu4) ... 137s Preparing to unpack .../002-whiptail_0.52.24-4ubuntu1_armhf.deb ... 137s Unpacking whiptail (0.52.24-4ubuntu1) over (0.52.24-2ubuntu4) ... 137s Preparing to unpack .../003-dracut-install_106-2ubuntu1_armhf.deb ... 137s Unpacking dracut-install (106-2ubuntu1) over (105-2ubuntu3) ... 137s Preparing to unpack .../004-initramfs-tools-bin_0.145ubuntu2_armhf.deb ... 137s Unpacking initramfs-tools-bin (0.145ubuntu2) over (0.142ubuntu35) ... 138s Preparing to unpack .../005-busybox-initramfs_1%3a1.37.0-4ubuntu1_armhf.deb ... 138s Unpacking busybox-initramfs (1:1.37.0-4ubuntu1) over (1:1.36.1-9ubuntu1) ... 138s Preparing to unpack .../006-python3.12_3.12.9-1_armhf.deb ... 138s Unpacking python3.12 (3.12.9-1) over (3.12.7-3) ... 138s Preparing to unpack .../007-libpython3.12-stdlib_3.12.9-1_armhf.deb ... 138s Unpacking libpython3.12-stdlib:armhf (3.12.9-1) over (3.12.7-3) ... 138s Preparing to unpack .../008-python3.12-minimal_3.12.9-1_armhf.deb ... 138s Unpacking python3.12-minimal (3.12.9-1) over (3.12.7-3) ... 138s Preparing to unpack .../009-libpython3.12-minimal_3.12.9-1_armhf.deb ... 138s Unpacking libpython3.12-minimal:armhf (3.12.9-1) over (3.12.7-3) ... 138s Preparing to unpack .../010-cron_3.0pl1-192ubuntu1_armhf.deb ... 138s Unpacking cron (3.0pl1-192ubuntu1) over (3.0pl1-189ubuntu1) ... 139s Preparing to unpack .../011-rsync_3.4.1-0syncable1_armhf.deb ... 139s Unpacking rsync (3.4.1-0syncable1) over (3.3.0-1) ... 139s Preparing to unpack .../012-python-apt-common_2.9.8_all.deb ... 139s Unpacking python-apt-common (2.9.8) over (2.9.0ubuntu2) ... 139s Preparing to unpack .../013-python3-apt_2.9.8_armhf.deb ... 139s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 139s for fn in glob1(directory, "%s.*" % fname): 139s Unpacking python3-apt (2.9.8) over (2.9.0ubuntu2) ... 139s Preparing to unpack .../014-python3-lazr.uri_1.0.6-5_all.deb ... 139s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 139s for fn in glob1(directory, "%s.*" % fname): 139s Unpacking python3-lazr.uri (1.0.6-5) over (1.0.6-4) ... 139s Preparing to unpack .../015-python3-launchpadlib_2.1.0-1_all.deb ... 139s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 139s for fn in glob1(directory, "%s.*" % fname): 139s Unpacking python3-launchpadlib (2.1.0-1) over (2.0.0-1) ... 139s Preparing to unpack .../016-python3-problem-report_2.31.0-0ubuntu5_all.deb ... 139s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 139s for fn in glob1(directory, "%s.*" % fname): 139s Unpacking python3-problem-report (2.31.0-0ubuntu5) over (2.30.0-0ubuntu5) ... 139s Preparing to unpack .../017-python3-apport_2.31.0-0ubuntu5_all.deb ... 139s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 139s for fn in glob1(directory, "%s.*" % fname): 139s Unpacking python3-apport (2.31.0-0ubuntu5) over (2.30.0-0ubuntu5) ... 140s Preparing to unpack .../018-python3-gi_3.50.0-4_armhf.deb ... 140s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 140s for fn in glob1(directory, "%s.*" % fname): 140s Unpacking python3-gi (3.50.0-4) over (3.50.0-3build1) ... 140s Preparing to unpack .../019-apport-core-dump-handler_2.31.0-0ubuntu5_all.deb ... 140s Unpacking apport-core-dump-handler (2.31.0-0ubuntu5) over (2.30.0-0ubuntu5) ... 140s Preparing to unpack .../020-apport_2.31.0-0ubuntu5_all.deb ... 140s Unpacking apport (2.31.0-0ubuntu5) over (2.30.0-0ubuntu5) ... 140s Preparing to unpack .../021-gcc-14-base_14.2.0-17ubuntu1_armhf.deb ... 140s Unpacking gcc-14-base:armhf (14.2.0-17ubuntu1) over (14.2.0-8ubuntu1) ... 140s Preparing to unpack .../022-libcom-err2_1.47.2-1ubuntu1_armhf.deb ... 140s Unpacking libcom-err2:armhf (1.47.2-1ubuntu1) over (1.47.1-1ubuntu1) ... 140s Preparing to unpack .../023-libss2_1.47.2-1ubuntu1_armhf.deb ... 140s Unpacking libss2:armhf (1.47.2-1ubuntu1) over (1.47.1-1ubuntu1) ... 140s Preparing to unpack .../024-openssl_3.4.0-1ubuntu2_armhf.deb ... 140s Unpacking openssl (3.4.0-1ubuntu2) over (3.3.1-2ubuntu2) ... 140s Preparing to unpack .../025-ca-certificates_20241223_all.deb ... 140s Unpacking ca-certificates (20241223) over (20240203) ... 140s Preparing to unpack .../026-distro-info_1.13_armhf.deb ... 140s Unpacking distro-info (1.13) over (1.12) ... 140s Preparing to unpack .../027-krb5-locales_1.21.3-4ubuntu1_all.deb ... 140s Unpacking krb5-locales (1.21.3-4ubuntu1) over (1.21.3-3) ... 141s Preparing to unpack .../028-libbpf1_1%3a1.5.0-2_armhf.deb ... 141s Unpacking libbpf1:armhf (1:1.5.0-2) over (1:1.5.0-1) ... 141s Preparing to unpack .../029-libfribidi0_1.0.16-1_armhf.deb ... 141s Unpacking libfribidi0:armhf (1.0.16-1) over (1.0.15-1) ... 141s Preparing to unpack .../030-libgssapi-krb5-2_1.21.3-4ubuntu1_armhf.deb ... 141s Unpacking libgssapi-krb5-2:armhf (1.21.3-4ubuntu1) over (1.21.3-3) ... 141s Preparing to unpack .../031-libkrb5-3_1.21.3-4ubuntu1_armhf.deb ... 141s Unpacking libkrb5-3:armhf (1.21.3-4ubuntu1) over (1.21.3-3) ... 141s Preparing to unpack .../032-libkrb5support0_1.21.3-4ubuntu1_armhf.deb ... 141s Unpacking libkrb5support0:armhf (1.21.3-4ubuntu1) over (1.21.3-3) ... 141s Preparing to unpack .../033-libk5crypto3_1.21.3-4ubuntu1_armhf.deb ... 141s Unpacking libk5crypto3:armhf (1.21.3-4ubuntu1) over (1.21.3-3) ... 141s Preparing to unpack .../034-libicu74_74.2-1ubuntu6_armhf.deb ... 141s Unpacking libicu74:armhf (74.2-1ubuntu6) over (74.2-1ubuntu4) ... 141s Preparing to unpack .../035-libxml2_2.12.7+dfsg+really2.9.14-0.2ubuntu3_armhf.deb ... 141s Unpacking libxml2:armhf (2.12.7+dfsg+really2.9.14-0.2ubuntu3) over (2.12.7+dfsg-3) ... 141s Preparing to unpack .../036-iptables_1.8.11-2ubuntu1_armhf.deb ... 141s Unpacking iptables (1.8.11-2ubuntu1) over (1.8.10-3ubuntu2) ... 142s Preparing to unpack .../037-libip4tc2_1.8.11-2ubuntu1_armhf.deb ... 142s Unpacking libip4tc2:armhf (1.8.11-2ubuntu1) over (1.8.10-3ubuntu2) ... 142s Preparing to unpack .../038-libip6tc2_1.8.11-2ubuntu1_armhf.deb ... 142s Unpacking libip6tc2:armhf (1.8.11-2ubuntu1) over (1.8.10-3ubuntu2) ... 142s Preparing to unpack .../039-libnftnl11_1.2.8-1_armhf.deb ... 142s Unpacking libnftnl11:armhf (1.2.8-1) over (1.2.7-1) ... 142s Preparing to unpack .../040-libxtables12_1.8.11-2ubuntu1_armhf.deb ... 142s Unpacking libxtables12:armhf (1.8.11-2ubuntu1) over (1.8.10-3ubuntu2) ... 142s Preparing to unpack .../041-python3-pygments_2.18.0+dfsg-2_all.deb ... 142s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 142s for fn in glob1(directory, "%s.*" % fname): 142s Unpacking python3-pygments (2.18.0+dfsg-2) over (2.18.0+dfsg-1ubuntu1) ... 142s Preparing to unpack .../042-python3-rich_13.9.4-1_all.deb ... 142s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 142s for fn in glob1(directory, "%s.*" % fname): 142s Unpacking python3-rich (13.9.4-1) over (13.7.1-1) ... 143s Preparing to unpack .../043-ucf_3.0049_all.deb ... 143s Unpacking ucf (3.0049) over (3.0043+nmu1) ... 143s Preparing to unpack .../044-rsyslog_8.2412.0-2ubuntu1_armhf.deb ... 143s Unpacking rsyslog (8.2412.0-2ubuntu1) over (8.2406.0-1ubuntu2) ... 143s Preparing to unpack .../045-apparmor_4.1.0~beta1-0ubuntu5_armhf.deb ... 144s Unpacking apparmor (4.1.0~beta1-0ubuntu5) over (4.1.0~beta1-0ubuntu4) ... 145s Preparing to unpack .../046-bash-completion_1%3a2.16.0-7_all.deb ... 145s Unpacking bash-completion (1:2.16.0-7) over (1:2.14.0-2) ... 145s Preparing to unpack .../047-libmaxminddb0_1.12.2-1_armhf.deb ... 145s Unpacking libmaxminddb0:armhf (1.12.2-1) over (1.11.0-1) ... 145s Preparing to unpack .../048-liburcu8t64_0.15.0-1_armhf.deb ... 145s Unpacking liburcu8t64:armhf (0.15.0-1) over (0.14.1-1) ... 145s Preparing to unpack .../049-bind9-dnsutils_1%3a9.20.0-2ubuntu4_armhf.deb ... 145s Unpacking bind9-dnsutils (1:9.20.0-2ubuntu4) over (1:9.20.0-2ubuntu3) ... 145s Preparing to unpack .../050-bind9-host_1%3a9.20.0-2ubuntu4_armhf.deb ... 145s Unpacking bind9-host (1:9.20.0-2ubuntu4) over (1:9.20.0-2ubuntu3) ... 145s Preparing to unpack .../051-bind9-libs_1%3a9.20.0-2ubuntu4_armhf.deb ... 145s Unpacking bind9-libs:armhf (1:9.20.0-2ubuntu4) over (1:9.20.0-2ubuntu3) ... 145s Preparing to unpack .../052-libedit2_3.1-20250104-1_armhf.deb ... 145s Unpacking libedit2:armhf (3.1-20250104-1) over (3.1-20240808-1) ... 145s Preparing to unpack .../053-busybox-static_1%3a1.37.0-4ubuntu1_armhf.deb ... 145s Unpacking busybox-static (1:1.37.0-4ubuntu1) over (1:1.36.1-9ubuntu1) ... 146s Preparing to unpack .../054-cron-daemon-common_3.0pl1-192ubuntu1_all.deb ... 146s Unpacking cron-daemon-common (3.0pl1-192ubuntu1) over (3.0pl1-189ubuntu1) ... 146s Preparing to unpack .../055-libdevmapper1.02.1_2%3a1.02.201-1ubuntu1_armhf.deb ... 146s Unpacking libdevmapper1.02.1:armhf (2:1.02.201-1ubuntu1) over (2:1.02.196-1ubuntu2) ... 146s Preparing to unpack .../056-dmsetup_2%3a1.02.201-1ubuntu1_armhf.deb ... 146s Unpacking dmsetup (2:1.02.201-1ubuntu1) over (2:1.02.196-1ubuntu2) ... 146s Preparing to unpack .../057-ed_1.21-1_armhf.deb ... 146s Unpacking ed (1.21-1) over (1.20.2-2) ... 146s Preparing to unpack .../058-gettext-base_0.23.1-1_armhf.deb ... 146s Unpacking gettext-base (0.23.1-1) over (0.22.5-2) ... 146s Preparing to unpack .../059-groff-base_1.23.0-7_armhf.deb ... 146s Unpacking groff-base (1.23.0-7) over (1.23.0-5) ... 146s Preparing to unpack .../060-libibverbs1_55.0-1ubuntu1_armhf.deb ... 146s Unpacking libibverbs1:armhf (55.0-1ubuntu1) over (52.0-2ubuntu1) ... 146s Preparing to unpack .../061-ibverbs-providers_55.0-1ubuntu1_armhf.deb ... 146s Unpacking ibverbs-providers:armhf (55.0-1ubuntu1) over (52.0-2ubuntu1) ... 146s Preparing to unpack .../062-iputils-tracepath_3%3a20240905-1ubuntu1_armhf.deb ... 146s Unpacking iputils-tracepath (3:20240905-1ubuntu1) over (3:20240117-1build1) ... 146s Preparing to unpack .../063-nftables_1.1.1-1build1_armhf.deb ... 146s Unpacking nftables (1.1.1-1build1) over (1.1.0-2) ... 146s Preparing to unpack .../064-libnftables1_1.1.1-1build1_armhf.deb ... 146s Unpacking libnftables1:armhf (1.1.1-1build1) over (1.1.0-2) ... 146s Preparing to unpack .../065-libpcap0.8t64_1.10.5-2ubuntu1_armhf.deb ... 146s Unpacking libpcap0.8t64:armhf (1.10.5-2ubuntu1) over (1.10.5-1ubuntu1) ... 146s Preparing to unpack .../066-libpng16-16t64_1.6.46-4_armhf.deb ... 146s Unpacking libpng16-16t64:armhf (1.6.46-4) over (1.6.44-2) ... 146s Preparing to unpack .../067-libtraceevent1-plugin_1%3a1.8.4-2_armhf.deb ... 146s Unpacking libtraceevent1-plugin:armhf (1:1.8.4-2) over (1:1.8.4-1) ... 147s Preparing to unpack .../068-libtraceevent1_1%3a1.8.4-2_armhf.deb ... 147s Unpacking libtraceevent1:armhf (1:1.8.4-2) over (1:1.8.4-1) ... 147s Preparing to unpack .../069-libusb-1.0-0_2%3a1.0.27-2_armhf.deb ... 147s Unpacking libusb-1.0-0:armhf (2:1.0.27-2) over (2:1.0.27-1) ... 147s Preparing to unpack .../070-libxdmcp6_1%3a1.1.5-1_armhf.deb ... 147s Unpacking libxdmcp6:armhf (1:1.1.5-1) over (1:1.1.3-0ubuntu6) ... 147s Preparing to unpack .../071-libxkbcommon0_1.7.0-2_armhf.deb ... 147s Unpacking libxkbcommon0:armhf (1.7.0-2) over (1.7.0-1) ... 147s Preparing to unpack .../072-lshw_02.19.git.2021.06.19.996aaad9c7-2.1ubuntu1_armhf.deb ... 147s Unpacking lshw (02.19.git.2021.06.19.996aaad9c7-2.1ubuntu1) over (02.19.git.2021.06.19.996aaad9c7-2ubuntu2) ... 147s Preparing to unpack .../073-nano_8.3-1_armhf.deb ... 147s Unpacking nano (8.3-1) over (8.2-1) ... 147s Preparing to unpack .../074-pci.ids_0.0~2025.02.12-1_all.deb ... 147s Unpacking pci.ids (0.0~2025.02.12-1) over (0.0~2024.10.24-1) ... 147s Preparing to unpack .../075-powermgmt-base_1.38_all.deb ... 147s Unpacking powermgmt-base (1.38) over (1.37+nmu1ubuntu1) ... 147s Preparing to unpack .../076-psmisc_23.7-2_armhf.deb ... 147s Unpacking psmisc (23.7-2) over (23.7-1build1) ... 147s Preparing to unpack .../077-publicsuffix_20250108.1153-0.1_all.deb ... 147s Unpacking publicsuffix (20250108.1153-0.1) over (20231001.0357-0.1) ... 147s Preparing to unpack .../078-python3-distro-info_1.13_all.deb ... 147s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 147s for fn in glob1(directory, "%s.*" % fname): 147s Unpacking python3-distro-info (1.13) over (1.12) ... 147s Preparing to unpack .../079-python3.13-gdbm_3.13.2-1_armhf.deb ... 147s Unpacking python3.13-gdbm (3.13.2-1) over (3.13.0-2) ... 147s Preparing to unpack .../080-python3.12-gdbm_3.12.9-1_armhf.deb ... 147s Unpacking python3.12-gdbm (3.12.9-1) over (3.12.7-3) ... 148s Preparing to unpack .../081-python3-gdbm_3.13.1-1_armhf.deb ... 148s Unpacking python3-gdbm:armhf (3.13.1-1) over (3.12.7-1) ... 148s Preparing to unpack .../082-ubuntu-standard_1.547_armhf.deb ... 148s Unpacking ubuntu-standard (1.547) over (1.544) ... 148s Preparing to unpack .../083-ufw_0.36.2-9_all.deb ... 148s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 148s for fn in glob1(directory, "%s.*" % fname): 148s Unpacking ufw (0.36.2-9) over (0.36.2-8) ... 148s Preparing to unpack .../084-usb.ids_2025.01.14-1_all.deb ... 148s Unpacking usb.ids (2025.01.14-1) over (2024.07.04-1) ... 148s Preparing to unpack .../085-xauth_1%3a1.1.2-1.1_armhf.deb ... 148s Unpacking xauth (1:1.1.2-1.1) over (1:1.1.2-1build1) ... 148s Preparing to unpack .../086-libcurl3t64-gnutls_8.12.0+git20250209.89ed161+ds-1ubuntu1_armhf.deb ... 148s Unpacking libcurl3t64-gnutls:armhf (8.12.0+git20250209.89ed161+ds-1ubuntu1) over (8.11.0-1ubuntu2) ... 148s Preparing to unpack .../087-libappstream5_1.0.4-1_armhf.deb ... 148s Unpacking libappstream5:armhf (1.0.4-1) over (1.0.3-1) ... 148s Preparing to unpack .../088-appstream_1.0.4-1_armhf.deb ... 148s Unpacking appstream (1.0.4-1) over (1.0.3-1) ... 148s Preparing to unpack .../089-libctf0_2.44-1ubuntu1_armhf.deb ... 148s Unpacking libctf0:armhf (2.44-1ubuntu1) over (2.43.1-4ubuntu1) ... 148s Preparing to unpack .../090-libctf-nobfd0_2.44-1ubuntu1_armhf.deb ... 148s Unpacking libctf-nobfd0:armhf (2.44-1ubuntu1) over (2.43.1-4ubuntu1) ... 148s Preparing to unpack .../091-binutils-arm-linux-gnueabihf_2.44-1ubuntu1_armhf.deb ... 148s Unpacking binutils-arm-linux-gnueabihf (2.44-1ubuntu1) over (2.43.1-4ubuntu1) ... 148s Preparing to unpack .../092-libbinutils_2.44-1ubuntu1_armhf.deb ... 148s Unpacking libbinutils:armhf (2.44-1ubuntu1) over (2.43.1-4ubuntu1) ... 149s Preparing to unpack .../093-binutils_2.44-1ubuntu1_armhf.deb ... 149s Unpacking binutils (2.44-1ubuntu1) over (2.43.1-4ubuntu1) ... 149s Preparing to unpack .../094-binutils-common_2.44-1ubuntu1_armhf.deb ... 149s Unpacking binutils-common:armhf (2.44-1ubuntu1) over (2.43.1-4ubuntu1) ... 149s Preparing to unpack .../095-libsframe1_2.44-1ubuntu1_armhf.deb ... 149s Unpacking libsframe1:armhf (2.44-1ubuntu1) over (2.43.1-4ubuntu1) ... 149s Preparing to unpack .../096-btrfs-progs_6.12-1build1_armhf.deb ... 149s Unpacking btrfs-progs (6.12-1build1) over (6.6.3-1.2) ... 149s Preparing to unpack .../097-python3-jinja2_3.1.5-2_all.deb ... 149s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 149s for fn in glob1(directory, "%s.*" % fname): 149s Unpacking python3-jinja2 (3.1.5-2) over (3.1.3-1ubuntu1) ... 149s Preparing to unpack .../098-python3-json-pointer_2.4-3_all.deb ... 149s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 149s for fn in glob1(directory, "%s.*" % fname): 149s Unpacking python3-json-pointer (2.4-3) over (2.4-2) ... 149s Preparing to unpack .../099-python3-jsonpatch_1.32-5_all.deb ... 149s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 149s for fn in glob1(directory, "%s.*" % fname): 149s Unpacking python3-jsonpatch (1.32-5) over (1.32-4) ... 149s Preparing to unpack .../100-python3-attr_25.1.0-1_all.deb ... 149s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 149s for fn in glob1(directory, "%s.*" % fname): 149s Unpacking python3-attr (25.1.0-1) over (23.2.0-2) ... 149s Preparing to unpack .../101-python3-referencing_0.35.1-2ubuntu1_all.deb ... 149s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 149s for fn in glob1(directory, "%s.*" % fname): 150s Unpacking python3-referencing (0.35.1-2ubuntu1) over (0.35.1-1ubuntu1) ... 150s Preparing to unpack .../102-python3-jsonschema_4.19.2-6ubuntu1_all.deb ... 150s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 150s for fn in glob1(directory, "%s.*" % fname): 150s Unpacking python3-jsonschema (4.19.2-6ubuntu1) over (4.19.2-3ubuntu1) ... 150s Preparing to unpack .../103-python3-jwt_2.10.1-2_all.deb ... 150s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 150s for fn in glob1(directory, "%s.*" % fname): 150s Unpacking python3-jwt (2.10.1-2) over (2.7.0-1) ... 150s Preparing to unpack .../104-python3-oauthlib_3.2.2-3_all.deb ... 150s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 150s for fn in glob1(directory, "%s.*" % fname): 150s Unpacking python3-oauthlib (3.2.2-3) over (3.2.2-2) ... 150s Preparing to unpack .../105-cloud-init-base_25.1~3geb1965a4-0ubuntu1_all.deb ... 150s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 150s for fn in glob1(directory, "%s.*" % fname): 151s Unpacking cloud-init-base (25.1~3geb1965a4-0ubuntu1) over (24.4-0ubuntu1) ... 151s dpkg: warning: unable to delete old directory '/lib/systemd/system/sshd-keygen@.service.d': Directory not empty 151s Preparing to unpack .../106-curl_8.12.0+git20250209.89ed161+ds-1ubuntu1_armhf.deb ... 151s Unpacking curl (8.12.0+git20250209.89ed161+ds-1ubuntu1) over (8.11.0-1ubuntu2) ... 151s Preparing to unpack .../107-libcurl4t64_8.12.0+git20250209.89ed161+ds-1ubuntu1_armhf.deb ... 151s Unpacking libcurl4t64:armhf (8.12.0+git20250209.89ed161+ds-1ubuntu1) over (8.11.0-1ubuntu2) ... 151s Preparing to unpack .../108-dpkg-dev_1.22.11ubuntu4_all.deb ... 151s Unpacking dpkg-dev (1.22.11ubuntu4) over (1.22.11ubuntu3) ... 151s Preparing to unpack .../109-libdpkg-perl_1.22.11ubuntu4_all.deb ... 151s Unpacking libdpkg-perl (1.22.11ubuntu4) over (1.22.11ubuntu3) ... 151s Preparing to unpack .../110-make_4.4.1-1_armhf.deb ... 151s Unpacking make (4.4.1-1) over (4.3-4.1build2) ... 151s Preparing to unpack .../111-libarchive13t64_3.7.7-0ubuntu1_armhf.deb ... 151s Unpacking libarchive13t64:armhf (3.7.7-0ubuntu1) over (3.7.4-1.1) ... 151s Preparing to unpack .../112-libjson-glib-1.0-common_1.10.6+ds-1_all.deb ... 151s Unpacking libjson-glib-1.0-common (1.10.6+ds-1) over (1.10.0+ds-3) ... 151s Preparing to unpack .../113-libjson-glib-1.0-0_1.10.6+ds-1_armhf.deb ... 151s Unpacking libjson-glib-1.0-0:armhf (1.10.6+ds-1) over (1.10.0+ds-3) ... 151s Preparing to unpack .../114-fwupd_2.0.5-1_armhf.deb ... 152s Unpacking fwupd (2.0.5-1) over (2.0.2-1) ... 152s Preparing to unpack .../115-libfwupd3_2.0.5-1_armhf.deb ... 152s Unpacking libfwupd3:armhf (2.0.5-1) over (2.0.2-1) ... 152s Preparing to unpack .../116-polkitd_126-2_armhf.deb ... 152s Unpacking polkitd (126-2) over (125-2ubuntu1) ... 152s Preparing to unpack .../117-libpolkit-agent-1-0_126-2_armhf.deb ... 152s Unpacking libpolkit-agent-1-0:armhf (126-2) over (125-2ubuntu1) ... 152s Preparing to unpack .../118-libpolkit-gobject-1-0_126-2_armhf.deb ... 152s Unpacking libpolkit-gobject-1-0:armhf (126-2) over (125-2ubuntu1) ... 152s Preparing to unpack .../119-libprotobuf-c1_1.5.1-1ubuntu1_armhf.deb ... 152s Unpacking libprotobuf-c1:armhf (1.5.1-1ubuntu1) over (1.4.1-1ubuntu4) ... 153s Preparing to unpack .../120-libqmi-proxy_1.35.6-1_armhf.deb ... 153s Unpacking libqmi-proxy (1.35.6-1) over (1.35.2-0ubuntu2) ... 153s Preparing to unpack .../121-libqmi-glib5_1.35.6-1_armhf.deb ... 153s Unpacking libqmi-glib5:armhf (1.35.6-1) over (1.35.2-0ubuntu2) ... 153s Preparing to unpack .../122-libpackagekit-glib2-18_1.3.0-3build1_armhf.deb ... 153s Unpacking libpackagekit-glib2-18:armhf (1.3.0-3build1) over (1.3.0-2) ... 153s Preparing to unpack .../123-gir1.2-packagekitglib-1.0_1.3.0-3build1_armhf.deb ... 153s Unpacking gir1.2-packagekitglib-1.0 (1.3.0-3build1) over (1.3.0-2) ... 153s Preparing to unpack .../124-gnupg-l10n_2.4.4-2ubuntu22_all.deb ... 153s Unpacking gnupg-l10n (2.4.4-2ubuntu22) over (2.4.4-2ubuntu18) ... 153s Preparing to unpack .../125-htop_3.3.0-5_armhf.deb ... 153s Unpacking htop (3.3.0-5) over (3.3.0-4build1) ... 153s Preparing to unpack .../126-libblockdev-utils3_3.3.0-1_armhf.deb ... 153s Unpacking libblockdev-utils3:armhf (3.3.0-1) over (3.2.1-1) ... 153s Preparing to unpack .../127-libnspr4_2%3a4.36-1ubuntu1_armhf.deb ... 153s Unpacking libnspr4:armhf (2:4.36-1ubuntu1) over (2:4.35-1.1ubuntu2) ... 153s Preparing to unpack .../128-libnss3_2%3a3.107-1ubuntu1_armhf.deb ... 153s Unpacking libnss3:armhf (2:3.107-1ubuntu1) over (2:3.103-1) ... 153s Preparing to unpack .../129-libgpgme11t64_1.24.1-4ubuntu1_armhf.deb ... 153s Unpacking libgpgme11t64:armhf (1.24.1-4ubuntu1) over (1.24.0-2ubuntu1) ... 153s Preparing to unpack .../130-libvolume-key1_0.3.12-9_armhf.deb ... 153s Unpacking libvolume-key1:armhf (0.3.12-9) over (0.3.12-8) ... 153s Preparing to unpack .../131-libblockdev-crypto3_3.3.0-1_armhf.deb ... 153s Unpacking libblockdev-crypto3:armhf (3.3.0-1) over (3.2.1-1) ... 153s Preparing to unpack .../132-libblockdev-fs3_3.3.0-1_armhf.deb ... 153s Unpacking libblockdev-fs3:armhf (3.3.0-1) over (3.2.1-1) ... 153s Preparing to unpack .../133-libblockdev-loop3_3.3.0-1_armhf.deb ... 153s Unpacking libblockdev-loop3:armhf (3.3.0-1) over (3.2.1-1) ... 153s Preparing to unpack .../134-libblockdev-mdraid3_3.3.0-1_armhf.deb ... 153s Unpacking libblockdev-mdraid3:armhf (3.3.0-1) over (3.2.1-1) ... 153s Preparing to unpack .../135-libnvme1t64_1.11.1-2_armhf.deb ... 153s Unpacking libnvme1t64 (1.11.1-2) over (1.11.1-1) ... 153s Preparing to unpack .../136-libblockdev-nvme3_3.3.0-1_armhf.deb ... 153s Unpacking libblockdev-nvme3:armhf (3.3.0-1) over (3.2.1-1) ... 154s Preparing to unpack .../137-libblockdev-part3_3.3.0-1_armhf.deb ... 154s Unpacking libblockdev-part3:armhf (3.3.0-1) over (3.2.1-1) ... 154s Preparing to unpack .../138-libblockdev-swap3_3.3.0-1_armhf.deb ... 154s Unpacking libblockdev-swap3:armhf (3.3.0-1) over (3.2.1-1) ... 154s Preparing to unpack .../139-libblockdev3_3.3.0-1_armhf.deb ... 154s Unpacking libblockdev3:armhf (3.3.0-1) over (3.2.1-1) ... 154s Preparing to unpack .../140-libftdi1-2_1.5-8_armhf.deb ... 154s Unpacking libftdi1-2:armhf (1.5-8) over (1.5-7build1) ... 154s Preparing to unpack .../141-libgstreamer1.0-0_1.25.50-1_armhf.deb ... 154s Unpacking libgstreamer1.0-0:armhf (1.25.50-1) over (1.24.9-1) ... 154s Preparing to unpack .../142-libgudev-1.0-0_1%3a238-6_armhf.deb ... 154s Unpacking libgudev-1.0-0:armhf (1:238-6) over (1:238-5ubuntu1) ... 154s Selecting previously unselected package libicu76:armhf. 154s Preparing to unpack .../143-libicu76_76.1-1ubuntu2_armhf.deb ... 154s Unpacking libicu76:armhf (76.1-1ubuntu2) ... 154s Preparing to unpack .../144-libsasl2-modules_2.1.28+dfsg1-8build1_armhf.deb ... 154s Unpacking libsasl2-modules:armhf (2.1.28+dfsg1-8build1) over (2.1.28+dfsg1-8) ... 154s Preparing to unpack .../145-udisks2_2.10.1-11ubuntu2_armhf.deb ... 154s Unpacking udisks2 (2.10.1-11ubuntu2) over (2.10.1-11ubuntu1) ... 154s Preparing to unpack .../146-libudisks2-0_2.10.1-11ubuntu2_armhf.deb ... 154s Unpacking libudisks2-0:armhf (2.10.1-11ubuntu2) over (2.10.1-11ubuntu1) ... 155s Preparing to unpack .../147-libwrap0_7.6.q-35_armhf.deb ... 155s Unpacking libwrap0:armhf (7.6.q-35) over (7.6.q-33) ... 155s Selecting previously unselected package linux-headers-6.12.0-15. 155s Preparing to unpack .../148-linux-headers-6.12.0-15_6.12.0-15.15_all.deb ... 155s Unpacking linux-headers-6.12.0-15 (6.12.0-15.15) ... 158s Selecting previously unselected package linux-headers-6.12.0-15-generic. 159s Preparing to unpack .../149-linux-headers-6.12.0-15-generic_6.12.0-15.15_armhf.deb ... 159s Unpacking linux-headers-6.12.0-15-generic (6.12.0-15.15) ... 160s Preparing to unpack .../150-linux-headers-generic_6.12.0-15.15+1_armhf.deb ... 160s Unpacking linux-headers-generic (6.12.0-15.15+1) over (6.11.0-8.8) ... 160s Preparing to unpack .../151-packagekit-tools_1.3.0-3build1_armhf.deb ... 160s Unpacking packagekit-tools (1.3.0-3build1) over (1.3.0-2) ... 160s Preparing to unpack .../152-packagekit_1.3.0-3build1_armhf.deb ... 160s Unpacking packagekit (1.3.0-3build1) over (1.3.0-2) ... 160s Preparing to unpack .../153-pollinate_4.33-4ubuntu2_all.deb ... 160s Unpacking pollinate (4.33-4ubuntu2) over (4.33-4ubuntu1) ... 161s Preparing to unpack .../154-python3-babel_2.17.0-1_all.deb ... 161s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 161s for fn in glob1(directory, "%s.*" % fname): 161s Unpacking python3-babel (2.17.0-1) over (2.16.0-1) ... 161s Preparing to unpack .../155-python-babel-localedata_2.17.0-1_all.deb ... 161s Unpacking python-babel-localedata (2.17.0-1) over (2.16.0-1) ... 162s Preparing to unpack .../156-python3-certifi_2025.1.31+ds-1_all.deb ... 162s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 162s for fn in glob1(directory, "%s.*" % fname): 162s Unpacking python3-certifi (2025.1.31+ds-1) over (2024.8.30+dfsg-1) ... 162s Preparing to unpack .../157-python3-chardet_5.2.0+dfsg-2_all.deb ... 162s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 162s for fn in glob1(directory, "%s.*" % fname): 162s Unpacking python3-chardet (5.2.0+dfsg-2) over (5.2.0+dfsg-1) ... 162s Preparing to unpack .../158-python3-idna_3.10-1_all.deb ... 162s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 162s for fn in glob1(directory, "%s.*" % fname): 162s Unpacking python3-idna (3.10-1) over (3.8-2) ... 162s Preparing to unpack .../159-python3-more-itertools_10.6.0-1_all.deb ... 162s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 162s for fn in glob1(directory, "%s.*" % fname): 162s Unpacking python3-more-itertools (10.6.0-1) over (10.5.0-1) ... 162s Preparing to unpack .../160-python3-openssl_25.0.0-1_all.deb ... 162s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 162s for fn in glob1(directory, "%s.*" % fname): 162s Unpacking python3-openssl (25.0.0-1) over (24.2.1-1) ... 162s Preparing to unpack .../161-python3-pkg-resources_75.6.0-1_all.deb ... 163s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 163s for fn in glob1(directory, "%s.*" % fname): 163s Unpacking python3-pkg-resources (75.6.0-1) over (75.2.0-1) ... 163s Preparing to unpack .../162-python3-setuptools_75.6.0-1_all.deb ... 163s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 163s for fn in glob1(directory, "%s.*" % fname): 163s Unpacking python3-setuptools (75.6.0-1) over (75.2.0-1) ... 163s Preparing to unpack .../163-software-properties-common_0.108_all.deb ... 163s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 163s for fn in glob1(directory, "%s.*" % fname): 163s Unpacking software-properties-common (0.108) over (0.105) ... 163s Preparing to unpack .../164-python3-software-properties_0.108_all.deb ... 163s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 163s for fn in glob1(directory, "%s.*" % fname): 163s Unpacking python3-software-properties (0.108) over (0.105) ... 163s Preparing to unpack .../165-python3-urllib3_2.3.0-1_all.deb ... 164s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 164s for fn in glob1(directory, "%s.*" % fname): 164s Unpacking python3-urllib3 (2.3.0-1) over (2.0.7-2ubuntu0.1) ... 164s Preparing to unpack .../166-python3-wadllib_2.0.0-2_all.deb ... 164s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 164s for fn in glob1(directory, "%s.*" % fname): 164s Unpacking python3-wadllib (2.0.0-2) over (2.0.0-1) ... 164s Preparing to unpack .../167-unattended-upgrades_2.12ubuntu2_all.deb ... 164s Unpacking unattended-upgrades (2.12ubuntu2) over (2.9.1+nmu4ubuntu1) ... 164s dpkg: warning: unable to delete old directory '/lib/systemd/system-sleep': Directory not empty 164s Preparing to unpack .../168-xfsprogs_6.12.0-1ubuntu1_armhf.deb ... 164s Unpacking xfsprogs (6.12.0-1ubuntu1) over (6.8.0-2.2ubuntu2) ... 164s Preparing to unpack .../169-zstd_1.5.6+dfsg-2_armhf.deb ... 164s Unpacking zstd (1.5.6+dfsg-2) over (1.5.6+dfsg-1) ... 164s Preparing to unpack .../170-cloud-init_25.1~3geb1965a4-0ubuntu1_all.deb ... 164s Unpacking cloud-init (25.1~3geb1965a4-0ubuntu1) over (24.4-0ubuntu1) ... 164s Preparing to unpack .../171-kpartx_0.9.9-1ubuntu4_armhf.deb ... 164s Unpacking kpartx (0.9.9-1ubuntu4) over (0.9.9-1ubuntu3) ... 164s Preparing to unpack .../172-multipath-tools_0.9.9-1ubuntu4_armhf.deb ... 164s Unpacking multipath-tools (0.9.9-1ubuntu4) over (0.9.9-1ubuntu3) ... 165s Setting up libip4tc2:armhf (1.8.11-2ubuntu1) ... 165s Setting up powermgmt-base (1.38) ... 165s Setting up distro-info (1.13) ... 165s Setting up liburcu8t64:armhf (0.15.0-1) ... 165s Setting up libibverbs1:armhf (55.0-1ubuntu1) ... 165s Setting up libxdmcp6:armhf (1:1.1.5-1) ... 165s Setting up pci.ids (0.0~2025.02.12-1) ... 165s Setting up libnewt0.52:armhf (0.52.24-4ubuntu1) ... 165s Setting up apt-utils (2.9.30) ... 165s Setting up bsdextrautils (2.40.2-14ubuntu1) ... 165s Setting up init (1.68) ... 165s Setting up ibverbs-providers:armhf (55.0-1ubuntu1) ... 165s Setting up gcc-14-base:armhf (14.2.0-17ubuntu1) ... 165s Setting up psmisc (23.7-2) ... 165s Setting up libyaml-0-2:armhf (0.2.5-2) ... 165s Setting up libip6tc2:armhf (1.8.11-2ubuntu1) ... 165s Setting up libmaxminddb0:armhf (1.12.2-1) ... 165s Setting up python3.12-gdbm (3.12.9-1) ... 165s Setting up libedit2:armhf (3.1-20250104-1) ... 165s Setting up libsasl2-modules:armhf (2.1.28+dfsg1-8build1) ... 165s Setting up netcat-openbsd (1.228-1) ... 165s Setting up libpython3.12-minimal:armhf (3.12.9-1) ... 165s Setting up binutils-common:armhf (2.44-1ubuntu1) ... 165s Setting up libctf-nobfd0:armhf (2.44-1ubuntu1) ... 165s Setting up gettext-base (0.23.1-1) ... 165s Setting up libnss-systemd:armhf (257.2-3ubuntu1) ... 165s Setting up libnftnl11:armhf (1.2.8-1) ... 165s Setting up krb5-locales (1.21.3-4ubuntu1) ... 165s Setting up libcom-err2:armhf (1.47.2-1ubuntu1) ... 165s Setting up lshw (02.19.git.2021.06.19.996aaad9c7-2.1ubuntu1) ... 165s Setting up locales (2.40-4ubuntu1) ... 166s Generating locales (this might take a while)... 168s en_US.UTF-8... done 168s Generation complete. 168s Setting up libldap-common (2.6.9+dfsg-1~exp2ubuntu1) ... 168s Installing new version of config file /etc/ldap/ldap.conf ... 168s Setting up libprotobuf-c1:armhf (1.5.1-1ubuntu1) ... 168s Setting up libsframe1:armhf (2.44-1ubuntu1) ... 168s Setting up python-babel-localedata (2.17.0-1) ... 168s Setting up libkrb5support0:armhf (1.21.3-4ubuntu1) ... 168s Setting up libsasl2-modules-db:armhf (2.1.28+dfsg1-8build1) ... 168s Setting up tzdata (2025a-2ubuntu1) ... 169s 169s Current default time zone: 'Etc/UTC' 169s Local time is now: Wed Feb 19 04:57:55 UTC 2025. 169s Universal Time is now: Wed Feb 19 04:57:55 UTC 2025. 169s Run 'dpkg-reconfigure tzdata' if you wish to change it. 169s 169s Setting up eject (2.40.2-14ubuntu1) ... 169s Setting up apparmor (4.1.0~beta1-0ubuntu5) ... 169s apparmor_parser: Unable to replace "lsb_release". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 169s 169s apparmor_parser: Unable to replace "kmod". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 169s 169s apparmor_parser: Unable to replace "nvidia_modprobe". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 169s 170s Reloading AppArmor profiles 170s /sbin/apparmor_parser: Unable to replace "1password". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "Discord". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "MongoDB Compass". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "QtWebEngineProcess". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "balena-etcher". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "brave". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "buildah". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "busybox". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "cam". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "ch-run". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "ch-checkns". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "chrome". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "chromium". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "vscode". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "crun". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "devhelp". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "element-desktop". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "epiphany". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "evolution". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "firefox". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "flatpak". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "foliate". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "geary". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "github-desktop". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "goldendict". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "ipa_verify". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "kchmviewer". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "keybase". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "lc-compliance". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "libcamerify". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "linux-sandbox". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "loupe". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "lxc-attach". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "lxc-create". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "lxc-destroy". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "lxc-execute". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "lxc-stop". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "lxc-unshare". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "lxc-usernsexec". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "mmdebstrap". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "msedge". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "nautilus". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "notepadqq". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "Xorg". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "obsidian". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "lsb_release". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "opam". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "pageedit". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "opera". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "podman". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "privacybrowser". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "polypane". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "qcam". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "QtWebEngineProcess". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "plasmashell". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "rpm". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "rssguard". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "qmapshack". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "qutebrowser". /sbin/apparmor_parser: Unable to replace "rootlesskit". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "runc". /sbin/apparmor_parser: Unable to replace "sbuild-abort". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "sbuild-adduser". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "sbuild-clean". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "sbuild". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "sbuild-checkpackages". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "sbuild-hold". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "sbuild-apt". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "sbuild-distupgrade". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "sbuild-destroychroot". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "sbuild-createchroot". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "scide". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "sbuild-update". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "sbuild-unhold". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "kmod". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "nvidia_modprobe". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "signal-desktop". /sbin/apparmor_parser: Unable to replace "sbuild-upgrade". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "slack". /sbin/apparmor_parser: Unable to replace "sbuild-shell". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "steam". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "stress-ng". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "slirp4netns". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "surfshark". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "toybox". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "thunderbird". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "systemd-coredump". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "trinity". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "tuxedo-control-center". /sbin/apparmor_parser: Unable to replace "tup". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "userbindmount". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "unprivileged_userns". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "uwsgi-core". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "vdens". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "virtiofsd". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "vivaldi-bin". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "vpnns". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "wike". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "wpcom". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "unix-chkpwd". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "/usr/bin/man". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "rsyslogd". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "ubuntu_pro_apt_news". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 170s /sbin/apparmor_parser: Unable to replace "tcpdump". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 170s 171s /sbin/apparmor_parser: Unable to replace "apt_methods". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 171s 171s /sbin/apparmor_parser: Unable to replace "ubuntu_pro_esm_cache". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 171s 171s /sbin/apparmor_parser: Unable to replace "transmission-cli". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 171s 171s Error: At least one profile failed to load 171s Setting up libglib2.0-data (2.83.3-2) ... 171s Setting up busybox-static (1:1.37.0-4ubuntu1) ... 171s Setting up systemd-cryptsetup (257.2-3ubuntu1) ... 171s Setting up libwrap0:armhf (7.6.q-35) ... 171s Setting up libnvme1t64 (1.11.1-2) ... 171s Setting up make (4.4.1-1) ... 171s Setting up libnspr4:armhf (2:4.36-1ubuntu1) ... 171s Setting up gnupg-l10n (2.4.4-2ubuntu22) ... 171s Setting up ed (1.21-1) ... 171s Setting up bash-completion (1:2.16.0-7) ... 171s Setting up libncurses6:armhf (6.5+20250125-2) ... 171s Setting up libdbus-1-3:armhf (1.16.0-1ubuntu1) ... 171s Setting up libfribidi0:armhf (1.0.16-1) ... 171s Setting up libpng16-16t64:armhf (1.6.46-4) ... 171s Setting up systemd-timesyncd (257.2-3ubuntu1) ... 171s systemd-time-wait-sync.service is a disabled or a static unit not running, not starting it. 171s Setting up libatomic1:armhf (15-20250213-1ubuntu1) ... 171s Setting up udev (257.2-3ubuntu1) ... 172s Setting up libss2:armhf (1.47.2-1ubuntu1) ... 172s Setting up usb.ids (2025.01.14-1) ... 172s Setting up dhcpcd-base (1:10.1.0-7) ... 172s Installing new version of config file /etc/dhcpcd.conf ... 172s Setting up ucf (3.0049) ... 172s Installing new version of config file /etc/ucf.conf ... 172s Setting up libncursesw6:armhf (6.5+20250125-2) ... 172s Setting up libk5crypto3:armhf (1.21.3-4ubuntu1) ... 172s Setting up busybox-initramfs (1:1.37.0-4ubuntu1) ... 172s Setting up libxtables12:armhf (1.8.11-2ubuntu1) ... 172s Setting up libdpkg-perl (1.22.11ubuntu4) ... 172s Setting up logsave (1.47.2-1ubuntu1) ... 172s Setting up libsasl2-2:armhf (2.1.28+dfsg1-8build1) ... 172s Setting up libfdisk1:armhf (2.40.2-14ubuntu1) ... 172s Setting up libicu74:armhf (74.2-1ubuntu6) ... 172s Setting up nano (8.3-1) ... 172s Installing new version of config file /etc/nanorc ... 172s Setting up libdevmapper1.02.1:armhf (2:1.02.201-1ubuntu1) ... 172s Setting up whiptail (0.52.24-4ubuntu1) ... 172s Setting up python-apt-common (2.9.8) ... 172s Setting up dracut-install (106-2ubuntu1) ... 172s Setting up dmsetup (2:1.02.201-1ubuntu1) ... 172s Setting up uuid-runtime (2.40.2-14ubuntu1) ... 173s uuidd.service is a disabled or a static unit not running, not starting it. 173s Setting up xauth (1:1.1.2-1.1) ... 173s Setting up groff-base (1.23.0-7) ... 173s Setting up libtraceevent1:armhf (1:1.8.4-2) ... 173s Setting up dbus-session-bus-common (1.16.0-1ubuntu1) ... 173s Setting up kpartx (0.9.9-1ubuntu4) ... 173s Setting up libpcap0.8t64:armhf (1.10.5-2ubuntu1) ... 173s Setting up libjson-glib-1.0-common (1.10.6+ds-1) ... 173s Setting up mawk (1.3.4.20250131-1) ... 173s Setting up libkrb5-3:armhf (1.21.3-4ubuntu1) ... 173s Setting up libusb-1.0-0:armhf (2:1.0.27-2) ... 173s Setting up libicu76:armhf (76.1-1ubuntu2) ... 173s Setting up linux-headers-6.12.0-15 (6.12.0-15.15) ... 173s Setting up keyboard-configuration (1.226ubuntu3) ... 174s Your console font configuration will be updated the next time your system 174s boots. If you want to update it now, run 'setupcon' from a virtual console. 174s update-initramfs: deferring update (trigger activated) 175s Setting up libbinutils:armhf (2.44-1ubuntu1) ... 175s Setting up dbus-system-bus-common (1.16.0-1ubuntu1) ... 175s Setting up openssl (3.4.0-1ubuntu2) ... 175s Installing new version of config file /etc/ssl/openssl.cnf ... 175s Setting up libgpg-error-l10n (1.51-3) ... 175s Setting up iputils-ping (3:20240905-1ubuntu1) ... 175s Setting up readline-common (8.2-6) ... 175s Setting up publicsuffix (20250108.1153-0.1) ... 175s Setting up libxml2:armhf (2.12.7+dfsg+really2.9.14-0.2ubuntu3) ... 175s Setting up zstd (1.5.6+dfsg-2) ... 175s Setting up libldap2:armhf (2.6.9+dfsg-1~exp2ubuntu1) ... 175s Setting up dbus-bin (1.16.0-1ubuntu1) ... 175s Setting up libbpf1:armhf (1:1.5.0-2) ... 175s Setting up iputils-tracepath (3:20240905-1ubuntu1) ... 175s Setting up rsync (3.4.1-0syncable1) ... 175s rsync.service is a disabled or a static unit not running, not starting it. 175s Setting up python3.13-gdbm (3.13.2-1) ... 175s Setting up ethtool (1:6.11-1) ... 175s Setting up gnupg-utils (2.4.4-2ubuntu22) ... 175s Setting up initramfs-tools-bin (0.145ubuntu2) ... 175s Setting up ncurses-term (6.5+20250125-2) ... 175s Setting up login (1:4.16.0-2+really2.40.2-14ubuntu1) ... 176s Setting up cron-daemon-common (3.0pl1-192ubuntu1) ... 176s Setting up libxkbcommon0:armhf (1.7.0-2) ... 176s Setting up libctf0:armhf (2.44-1ubuntu1) ... 176s Setting up pinentry-curses (1.3.1-2ubuntu2) ... 176s Setting up python3.12-minimal (3.12.9-1) ... 177s Setting up libnftables1:armhf (1.1.1-1build1) ... 177s Setting up nftables (1.1.1-1build1) ... 177s Setting up iptables (1.8.11-2ubuntu1) ... 177s Setting up htop (3.3.0-5) ... 177s Setting up btrfs-progs (6.12-1build1) ... 177s Setting up cron (3.0pl1-192ubuntu1) ... 178s Setting up rsyslog (8.2412.0-2ubuntu1) ... 178s Installing new version of config file /etc/apparmor.d/usr.sbin.rsyslogd ... 178s info: The user `syslog' is already a member of `adm'. 179s apparmor_parser: Unable to replace "rsyslogd". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 179s 180s Setting up e2fsprogs (1.47.2-1ubuntu1) ... 180s update-initramfs: deferring update (trigger activated) 180s Setting up libnss3:armhf (2:3.107-1ubuntu1) ... 180s Setting up dbus-daemon (1.16.0-1ubuntu1) ... 180s Setting up multipath-tools (0.9.9-1ubuntu4) ... 181s Setting up libftdi1-2:armhf (1.5-8) ... 181s Setting up ca-certificates (20241223) ... 184s Updating certificates in /etc/ssl/certs... 187s rehash: warning: skipping ca-certificates.crt, it does not contain exactly one certificate or CRL 187s 7 added, 1 removed; done. 187s Setting up libglib2.0-0t64:armhf (2.83.3-2) ... 187s No schema files found: doing nothing. 187s Setting up dbus (1.16.0-1ubuntu1) ... 187s A reboot is required to replace the running dbus-daemon. 187s Please reboot the system when convenient. 187s Setting up libblockdev-utils3:armhf (3.3.0-1) ... 187s Setting up linux-headers-6.12.0-15-generic (6.12.0-15.15) ... 187s Setting up libgssapi-krb5-2:armhf (1.21.3-4ubuntu1) ... 187s Setting up gir1.2-glib-2.0:armhf (2.83.3-2) ... 187s Setting up libreadline8t64:armhf (8.2-6) ... 187s Setting up libblockdev-nvme3:armhf (3.3.0-1) ... 187s Setting up libblockdev-fs3:armhf (3.3.0-1) ... 187s Setting up libtraceevent1-plugin:armhf (1:1.8.4-2) ... 187s Setting up gpgconf (2.4.4-2ubuntu22) ... 187s Setting up libpam-systemd:armhf (257.2-3ubuntu1) ... 187s Setting up libgirepository-1.0-1:armhf (1.82.0-4) ... 187s Setting up console-setup-linux (1.226ubuntu3) ... 189s Setting up initramfs-tools-core (0.145ubuntu2) ... 189s Setting up binutils-arm-linux-gnueabihf (2.44-1ubuntu1) ... 189s Setting up libarchive13t64:armhf (3.7.7-0ubuntu1) ... 189s Setting up libpython3.13-stdlib:armhf (3.13.2-1) ... 189s Setting up gpg (2.4.4-2ubuntu22) ... 189s Setting up libgudev-1.0-0:armhf (1:238-6) ... 189s Setting up libpolkit-gobject-1-0:armhf (126-2) ... 189s Setting up libgstreamer1.0-0:armhf (1.25.50-1) ... 189s Setcap worked! gst-ptp-helper is not suid! 189s Setting up libudisks2-0:armhf (2.10.1-11ubuntu2) ... 189s Setting up libpython3-stdlib:armhf (3.13.1-1~exp2) ... 189s Setting up systemd-resolved (257.2-3ubuntu1) ... 189s Setting up console-setup (1.226ubuntu3) ... 190s update-initramfs: deferring update (trigger activated) 190s Setting up gpg-agent (2.4.4-2ubuntu22) ... 191s Setting up libpython3.12-stdlib:armhf (3.12.9-1) ... 191s Setting up initramfs-tools (0.145ubuntu2) ... 191s update-initramfs: deferring update (trigger activated) 191s Setting up libblockdev-mdraid3:armhf (3.3.0-1) ... 191s Setting up libcurl4t64:armhf (8.12.0+git20250209.89ed161+ds-1ubuntu1) ... 191s Setting up bind9-libs:armhf (1:9.20.0-2ubuntu4) ... 191s Setting up e2fsprogs-l10n (1.47.2-1ubuntu1) ... 191s Setting up python3.13 (3.13.2-1) ... 192s Setting up libblockdev-swap3:armhf (3.3.0-1) ... 192s Setting up python3.12 (3.12.9-1) ... 194s Setting up libblockdev-loop3:armhf (3.3.0-1) ... 194s Setting up gpgsm (2.4.4-2ubuntu22) ... 194s Setting up libcurl3t64-gnutls:armhf (8.12.0+git20250209.89ed161+ds-1ubuntu1) ... 194s Setting up libglib2.0-bin (2.83.3-2) ... 194s Setting up libpackagekit-glib2-18:armhf (1.3.0-3build1) ... 194s Setting up libappstream5:armhf (1.0.4-1) ... 194s Setting up libqmi-glib5:armhf (1.35.6-1) ... 194s Setting up python3 (3.13.1-1~exp2) ... 194s /usr/bin/py3clean:101: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 194s for fn in glob1(directory, "%s.*" % fname): 194s Setting up linux-headers-generic (6.12.0-15.15+1) ... 194s Setting up binutils (2.44-1ubuntu1) ... 194s Setting up libnetplan1:armhf (1.1.2-2ubuntu1) ... 194s Setting up python3-newt:armhf (0.52.24-4ubuntu1) ... 194s Setting up libblockdev3:armhf (3.3.0-1) ... 194s Setting up fdisk (2.40.2-14ubuntu1) ... 194s Setting up dpkg-dev (1.22.11ubuntu4) ... 194s Setting up libjson-glib-1.0-0:armhf (1.10.6+ds-1) ... 194s Setting up libblockdev-part3:armhf (3.3.0-1) ... 194s Setting up dirmngr (2.4.4-2ubuntu22) ... 195s Setting up gir1.2-packagekitglib-1.0 (1.3.0-3build1) ... 195s Setting up dbus-user-session (1.16.0-1ubuntu1) ... 195s Setting up python3-jinja2 (3.1.5-2) ... 195s Setting up python3-pygments (2.18.0+dfsg-2) ... 197s Setting up python3-chardet (5.2.0+dfsg-2) ... 198s Setting up appstream (1.0.4-1) ... 200s ✔ Metadata cache was updated successfully. 200s Setting up python3-certifi (2025.1.31+ds-1) ... 201s Setting up gir1.2-girepository-2.0:armhf (1.82.0-4) ... 201s Setting up python3-gi (3.50.0-4) ... 201s Setting up python3-idna (3.10-1) ... 201s Setting up xfsprogs (6.12.0-1ubuntu1) ... 201s update-initramfs: deferring update (trigger activated) 203s Setting up keyboxd (2.4.4-2ubuntu22) ... 203s Setting up python3-urllib3 (2.3.0-1) ... 203s Setting up python3-json-pointer (2.4-3) ... 203s Setting up gnupg (2.4.4-2ubuntu22) ... 203s Setting up python3-netplan (1.1.2-2ubuntu1) ... 203s Setting up libpolkit-agent-1-0:armhf (126-2) ... 203s Setting up libgpgme11t64:armhf (1.24.1-4ubuntu1) ... 203s Setting up curl (8.12.0+git20250209.89ed161+ds-1ubuntu1) ... 203s Setting up libvolume-key1:armhf (0.3.12-9) ... 203s Setting up netplan-generator (1.1.2-2ubuntu1) ... 203s Removing 'diversion of /lib/systemd/system-generators/netplan to /lib/systemd/system-generators/netplan.usr-is-merged by netplan-generator' 203s Setting up bind9-host (1:9.20.0-2ubuntu4) ... 203s Setting up python3-distro-info (1.13) ... 203s Setting up polkitd (126-2) ... 204s Setting up python3-more-itertools (10.6.0-1) ... 204s Setting up python3-attr (25.1.0-1) ... 205s Setting up gpg-wks-client (2.4.4-2ubuntu22) ... 205s Setting up libblockdev-crypto3:armhf (3.3.0-1) ... 205s Setting up python3-jwt (2.10.1-2) ... 205s Setting up python3-babel (2.17.0-1) ... 205s Setting up python3-rich (13.9.4-1) ... 206s Setting up python3-gdbm:armhf (3.13.1-1) ... 206s Setting up python3-problem-report (2.31.0-0ubuntu5) ... 206s Setting up python3-apt (2.9.8) ... 207s Setting up python3-jsonpatch (1.32-5) ... 207s Setting up python3-bcrypt (4.2.0-2.1) ... 207s Setting up libqmi-proxy (1.35.6-1) ... 207s Setting up libfwupd3:armhf (2.0.5-1) ... 207s Setting up ufw (0.36.2-9) ... 208s Setting up python3-lazr.uri (1.0.6-5) ... 209s Setting up netplan.io (1.1.2-2ubuntu1) ... 209s Setting up unattended-upgrades (2.12ubuntu2) ... 209s Replacing config file /etc/apt/apt.conf.d/50unattended-upgrades with new version 210s Setting up pollinate (4.33-4ubuntu2) ... 210s Setting up python3-cryptography (43.0.0-1) ... 211s Setting up python3-wadllib (2.0.0-2) ... 211s Setting up bind9-dnsutils (1:9.20.0-2ubuntu4) ... 211s Setting up fwupd (2.0.5-1) ... 212s fwupd-refresh.service is a disabled or a static unit not running, not starting it. 212s fwupd.service is a disabled or a static unit not running, not starting it. 212s Setting up python3-referencing (0.35.1-2ubuntu1) ... 212s Setting up python3-pkg-resources (75.6.0-1) ... 212s Setting up udisks2 (2.10.1-11ubuntu2) ... 212s vda: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:01.3/0000:04:00.0/virtio2/block/vda/uevent': Permission denied 212s vda1: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:01.3/0000:04:00.0/virtio2/block/vda/vda1/uevent': Permission denied 212s vda15: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:01.3/0000:04:00.0/virtio2/block/vda/vda15/uevent': Permission denied 212s vda2: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:01.3/0000:04:00.0/virtio2/block/vda/vda2/uevent': Permission denied 212s loop0: Failed to write 'change' to '/sys/devices/virtual/block/loop0/uevent': Permission denied 212s loop1: Failed to write 'change' to '/sys/devices/virtual/block/loop1/uevent': Permission denied 212s loop2: Failed to write 'change' to '/sys/devices/virtual/block/loop2/uevent': Permission denied 212s loop3: Failed to write 'change' to '/sys/devices/virtual/block/loop3/uevent': Permission denied 212s loop4: Failed to write 'change' to '/sys/devices/virtual/block/loop4/uevent': Permission denied 212s loop5: Failed to write 'change' to '/sys/devices/virtual/block/loop5/uevent': Permission denied 212s loop6: Failed to write 'change' to '/sys/devices/virtual/block/loop6/uevent': Permission denied 212s loop7: Failed to write 'change' to '/sys/devices/virtual/block/loop7/uevent': Permission denied 212s loop8: Failed to write 'change' to '/sys/devices/virtual/block/loop8/uevent': Permission denied 212s loop9: Failed to write 'change' to '/sys/devices/virtual/block/loop9/uevent': Permission denied 213s Setting up python3-setuptools (75.6.0-1) ... 215s Setting up ubuntu-minimal (1.547) ... 215s Setting up python3-openssl (25.0.0-1) ... 215s Setting up python3-launchpadlib (2.1.0-1) ... 216s Setting up ubuntu-standard (1.547) ... 216s Setting up python3-apport (2.31.0-0ubuntu5) ... 216s Setting up python3-oauthlib (3.2.2-3) ... 217s Setting up python3-software-properties (0.108) ... 217s Setting up python3-jsonschema (4.19.2-6ubuntu1) ... 218s Setting up cloud-init-base (25.1~3geb1965a4-0ubuntu1) ... 218s Installing new version of config file /etc/cloud/templates/sources.list.debian.deb822.tmpl ... 218s Installing new version of config file /etc/cloud/templates/sources.list.ubuntu.deb822.tmpl ... 220s Setting up cloud-init (25.1~3geb1965a4-0ubuntu1) ... 220s Setting up apport-core-dump-handler (2.31.0-0ubuntu5) ... 221s Setting up apport (2.31.0-0ubuntu5) ... 222s apport-autoreport.service is a disabled or a static unit not running, not starting it. 222s Processing triggers for shared-mime-info (2.4-5) ... 222s Warning: program compiled against libxml 212 using older 209 223s Processing triggers for sgml-base (1.31) ... 223s Processing triggers for debianutils (5.21) ... 223s Processing triggers for install-info (7.1.1-1) ... 223s Processing triggers for libc-bin (2.40-4ubuntu1) ... 223s Processing triggers for systemd (257.2-3ubuntu1) ... 223s Processing triggers for man-db (2.13.0-1) ... 225s Setting up packagekit (1.3.0-3build1) ... 225s Setting up packagekit-tools (1.3.0-3build1) ... 225s Setting up software-properties-common (0.108) ... 225s Processing triggers for ca-certificates (20241223) ... 225s Updating certificates in /etc/ssl/certs... 227s 0 added, 0 removed; done. 227s Running hooks in /etc/ca-certificates/update.d... 227s done. 227s Processing triggers for initramfs-tools (0.145ubuntu2) ... 230s Reading package lists... 231s Building dependency tree... 231s Reading state information... 232s Starting pkgProblemResolver with broken count: 0 232s Starting 2 pkgProblemResolver with broken count: 0 232s Done 233s The following packages will be REMOVED: 233s libassuan0* libicu74* libnsl2* libpython3.12-minimal* libpython3.12-stdlib* 233s libunwind8* linux-headers-6.11.0-8* linux-headers-6.11.0-8-generic* 233s python3.12* python3.12-minimal* 233s 0 upgraded, 0 newly installed, 10 to remove and 0 not upgraded. 233s After this operation, 151 MB disk space will be freed. 234s (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 ... 92762 files and directories currently installed.) 234s Removing libassuan0:armhf (2.5.6-1build1) ... 234s Removing libicu74:armhf (74.2-1ubuntu6) ... 234s Removing python3.12 (3.12.9-1) ... 234s Removing libpython3.12-stdlib:armhf (3.12.9-1) ... 234s Removing libnsl2:armhf (1.3.0-3build3) ... 234s Removing python3.12-minimal (3.12.9-1) ... 234s /usr/bin/py3clean:125: DeprecationWarning: glob.glob1 is deprecated and will be removed in Python 3.15. Use glob.glob and pass a directory to its root_dir argument instead. 234s for fn in glob1(directory, "%s.%s.py[co]" % (fname, magic_tag)): 235s Removing libpython3.12-minimal:armhf (3.12.9-1) ... 235s Removing libunwind8:armhf (1.6.2-3.1) ... 235s Removing linux-headers-6.11.0-8-generic (6.11.0-8.8) ... 236s Removing linux-headers-6.11.0-8 (6.11.0-8.8) ... 238s Processing triggers for systemd (257.2-3ubuntu1) ... 238s Processing triggers for man-db (2.13.0-1) ... 238s Processing triggers for libc-bin (2.40-4ubuntu1) ... 238s (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 ... 60306 files and directories currently installed.) 238s Purging configuration files for python3.12-minimal (3.12.9-1) ... 238s Purging configuration files for libpython3.12-minimal:armhf (3.12.9-1) ... 240s autopkgtest [04:59:07]: rebooting testbed after setup commands that affected boot 291s autopkgtest [04:59:58]: testbed running kernel: Linux 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 18:12:14 UTC 2 323s autopkgtest [05:00:30]: @@@@@@@@@@@@@@@@@@@@ apt-source sqlfluff 341s Get:1 http://ftpmaster.internal/ubuntu plucky/universe sqlfluff 3.3.1-1 (dsc) [3968 B] 341s Get:2 http://ftpmaster.internal/ubuntu plucky/universe sqlfluff 3.3.1-1 (tar) [2961 kB] 341s Get:3 http://ftpmaster.internal/ubuntu plucky/universe sqlfluff 3.3.1-1 (diff) [9076 B] 341s gpgv: Signature made Sun Feb 9 16:45:26 2025 UTC 341s gpgv: using RSA key AC0A4FF12611B6FCCF01C111393587D97D86500B 341s gpgv: Can't check signature: No public key 341s dpkg-source: warning: cannot verify inline signature for ./sqlfluff_3.3.1-1.dsc: no acceptable signature found 341s autopkgtest [05:00:48]: testing package sqlfluff version 3.3.1-1 344s autopkgtest [05:00:51]: build not needed 348s autopkgtest [05:00:55]: test upstream: preparing testbed 350s Reading package lists... 351s Building dependency tree... 351s Reading state information... 351s Starting pkgProblemResolver with broken count: 0 351s Starting 2 pkgProblemResolver with broken count: 0 351s Done 352s The following NEW packages will be installed: 352s diff-cover libnsl2 libpython3.12-minimal libpython3.12-stdlib python3-all 352s python3-click python3-colorama python3-dateutil python3-hypothesis 352s python3-iniconfig python3-packaging python3-pathspec python3-platformdirs 352s python3-pluggy python3-pytest python3-regex python3-sortedcontainers 352s python3-tblib python3-tqdm python3.12 python3.12-minimal sqlfluff 352s 0 upgraded, 22 newly installed, 0 to remove and 0 not upgraded. 352s Need to get 2056 kB/7510 kB of archives. 352s After this operation, 33.4 MB of additional disk space will be used. 352s Get:1 http://ftpmaster.internal/ubuntu plucky/main armhf libnsl2 armhf 1.3.0-3build3 [36.5 kB] 353s Get:2 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pluggy all 1.5.0-1 [21.0 kB] 353s Get:3 http://ftpmaster.internal/ubuntu plucky/universe armhf diff-cover all 9.2.2-1 [44.2 kB] 353s Get:4 http://ftpmaster.internal/ubuntu plucky/main armhf python3-all armhf 3.13.1-1~exp2 [896 B] 353s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf python3-click all 8.2.0-1 [81.9 kB] 353s Get:6 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-colorama all 0.4.6-4 [32.1 kB] 353s Get:7 http://ftpmaster.internal/ubuntu plucky/main armhf python3-dateutil all 2.9.0-3 [80.2 kB] 353s Get:8 http://ftpmaster.internal/ubuntu plucky/main armhf python3-sortedcontainers all 2.4.0-2 [27.6 kB] 353s Get:9 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-hypothesis all 6.125.2-1 [333 kB] 353s Get:10 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-iniconfig all 1.1.1-2 [6024 B] 353s Get:11 http://ftpmaster.internal/ubuntu plucky/main armhf python3-packaging all 24.2-1 [51.5 kB] 353s Get:12 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pathspec all 0.12.1-1 [24.5 kB] 353s Get:13 http://ftpmaster.internal/ubuntu plucky/main armhf python3-platformdirs all 4.3.6-1 [16.8 kB] 353s Get:14 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pytest all 8.3.4-1 [252 kB] 353s Get:15 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-regex armhf 0.1.20241106-1 [278 kB] 353s Get:16 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-tblib all 3.0.0-6 [13.0 kB] 353s Get:17 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-tqdm all 4.67.1-2 [92.5 kB] 353s Get:18 http://ftpmaster.internal/ubuntu plucky/universe armhf sqlfluff all 3.3.1-1 [665 kB] 354s Fetched 2056 kB in 1s (3151 kB/s) 354s Selecting previously unselected package libpython3.12-minimal:armhf. 354s (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 ... 60304 files and directories currently installed.) 354s Preparing to unpack .../00-libpython3.12-minimal_3.12.9-1_armhf.deb ... 354s Unpacking libpython3.12-minimal:armhf (3.12.9-1) ... 354s Selecting previously unselected package python3.12-minimal. 354s Preparing to unpack .../01-python3.12-minimal_3.12.9-1_armhf.deb ... 354s Unpacking python3.12-minimal (3.12.9-1) ... 354s Selecting previously unselected package libnsl2:armhf. 354s Preparing to unpack .../02-libnsl2_1.3.0-3build3_armhf.deb ... 354s Unpacking libnsl2:armhf (1.3.0-3build3) ... 354s Selecting previously unselected package libpython3.12-stdlib:armhf. 354s Preparing to unpack .../03-libpython3.12-stdlib_3.12.9-1_armhf.deb ... 354s Unpacking libpython3.12-stdlib:armhf (3.12.9-1) ... 354s Selecting previously unselected package python3.12. 354s Preparing to unpack .../04-python3.12_3.12.9-1_armhf.deb ... 354s Unpacking python3.12 (3.12.9-1) ... 354s Selecting previously unselected package python3-pluggy. 354s Preparing to unpack .../05-python3-pluggy_1.5.0-1_all.deb ... 354s Unpacking python3-pluggy (1.5.0-1) ... 354s Selecting previously unselected package diff-cover. 354s Preparing to unpack .../06-diff-cover_9.2.2-1_all.deb ... 354s Unpacking diff-cover (9.2.2-1) ... 354s Selecting previously unselected package python3-all. 354s Preparing to unpack .../07-python3-all_3.13.1-1~exp2_armhf.deb ... 354s Unpacking python3-all (3.13.1-1~exp2) ... 354s Selecting previously unselected package python3-click. 354s Preparing to unpack .../08-python3-click_8.2.0-1_all.deb ... 354s Unpacking python3-click (8.2.0-1) ... 354s Selecting previously unselected package python3-colorama. 354s Preparing to unpack .../09-python3-colorama_0.4.6-4_all.deb ... 354s Unpacking python3-colorama (0.4.6-4) ... 354s Selecting previously unselected package python3-dateutil. 355s Preparing to unpack .../10-python3-dateutil_2.9.0-3_all.deb ... 355s Unpacking python3-dateutil (2.9.0-3) ... 355s Selecting previously unselected package python3-sortedcontainers. 355s Preparing to unpack .../11-python3-sortedcontainers_2.4.0-2_all.deb ... 355s Unpacking python3-sortedcontainers (2.4.0-2) ... 355s Selecting previously unselected package python3-hypothesis. 355s Preparing to unpack .../12-python3-hypothesis_6.125.2-1_all.deb ... 355s Unpacking python3-hypothesis (6.125.2-1) ... 355s Selecting previously unselected package python3-iniconfig. 355s Preparing to unpack .../13-python3-iniconfig_1.1.1-2_all.deb ... 355s Unpacking python3-iniconfig (1.1.1-2) ... 355s Selecting previously unselected package python3-packaging. 355s Preparing to unpack .../14-python3-packaging_24.2-1_all.deb ... 355s Unpacking python3-packaging (24.2-1) ... 355s Selecting previously unselected package python3-pathspec. 355s Preparing to unpack .../15-python3-pathspec_0.12.1-1_all.deb ... 355s Unpacking python3-pathspec (0.12.1-1) ... 355s Selecting previously unselected package python3-platformdirs. 355s Preparing to unpack .../16-python3-platformdirs_4.3.6-1_all.deb ... 355s Unpacking python3-platformdirs (4.3.6-1) ... 355s Selecting previously unselected package python3-pytest. 355s Preparing to unpack .../17-python3-pytest_8.3.4-1_all.deb ... 355s Unpacking python3-pytest (8.3.4-1) ... 355s Selecting previously unselected package python3-regex. 355s Preparing to unpack .../18-python3-regex_0.1.20241106-1_armhf.deb ... 355s Unpacking python3-regex (0.1.20241106-1) ... 355s Selecting previously unselected package python3-tblib. 355s Preparing to unpack .../19-python3-tblib_3.0.0-6_all.deb ... 355s Unpacking python3-tblib (3.0.0-6) ... 355s Selecting previously unselected package python3-tqdm. 355s Preparing to unpack .../20-python3-tqdm_4.67.1-2_all.deb ... 355s Unpacking python3-tqdm (4.67.1-2) ... 355s Selecting previously unselected package sqlfluff. 355s Preparing to unpack .../21-sqlfluff_3.3.1-1_all.deb ... 355s Unpacking sqlfluff (3.3.1-1) ... 355s Setting up python3-iniconfig (1.1.1-2) ... 356s Setting up python3-tblib (3.0.0-6) ... 356s Setting up python3-colorama (0.4.6-4) ... 356s Setting up python3-tqdm (4.67.1-2) ... 357s Setting up libpython3.12-minimal:armhf (3.12.9-1) ... 357s Setting up python3-sortedcontainers (2.4.0-2) ... 357s Setting up python3-click (8.2.0-1) ... 357s Setting up python3-platformdirs (4.3.6-1) ... 357s Setting up python3-packaging (24.2-1) ... 358s Setting up python3-regex (0.1.20241106-1) ... 358s Setting up python3-pluggy (1.5.0-1) ... 358s Setting up libnsl2:armhf (1.3.0-3build3) ... 358s Setting up python3-dateutil (2.9.0-3) ... 359s Setting up diff-cover (9.2.2-1) ... 359s Setting up python3-pathspec (0.12.1-1) ... 359s Setting up python3.12-minimal (3.12.9-1) ... 360s Setting up libpython3.12-stdlib:armhf (3.12.9-1) ... 360s Setting up python3-pytest (8.3.4-1) ... 361s Setting up python3.12 (3.12.9-1) ... 363s Setting up python3-hypothesis (6.125.2-1) ... 364s Setting up python3-all (3.13.1-1~exp2) ... 364s Setting up sqlfluff (3.3.1-1) ... 365s Processing triggers for systemd (257.2-3ubuntu1) ... 365s Processing triggers for man-db (2.13.0-1) ... 366s Processing triggers for libc-bin (2.40-4ubuntu1) ... 377s autopkgtest [05:01:24]: test upstream: [----------------------- 380s + cp -a -t /tmp/autopkgtest.MdGcw7/autopkgtest_tmp test pyproject.toml README.md plugins 380s + cd /tmp/autopkgtest.MdGcw7/autopkgtest_tmp 380s + rm test/core/plugin_test.py 380s + py3versions -s 380s + printf =-=-=-=-=-= Running tests for %s =-=-=-=-=-=\n python3.12 380s + python3.12 -m pytest -k not appdir test 380s =-=-=-=-=-= Running tests for python3.12 =-=-=-=-=-= 387s ============================= test session starts ============================== 387s platform linux -- Python 3.12.9, pytest-8.3.4, pluggy-1.5.0 387s rootdir: /tmp/autopkgtest.MdGcw7/autopkgtest_tmp 387s configfile: pyproject.toml 387s plugins: typeguard-4.4.1, hypothesis-6.125.2 387s collected 8521 items / 1 deselected / 8520 selected 387s 387s test/api/classes_test.py .... [ 0%] 387s test/api/info_test.py .. [ 0%] 389s test/api/simple_test.py ................... [ 0%] 389s test/cli/autocomplete_test.py ..... [ 0%] 391s test/cli/commands_test.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 0%] 394s FFFFFFFFFFFFFFFFFFFFFFFFFF.......FFFFFF.......FFFFFFFFFFFFFFFFFFFFFFFFFF [ 1%] 397s FFFFFF.FFFFFFFFFFFFFFFFF.FFFFFFFFFFFF.FFFFFFFFFFFF [ 2%] 397s test/cli/formatters_test.py ..... [ 2%] 397s test/cli/helpers_test.py ......... [ 2%] 397s test/core/config/fluffconfig_test.py ........................... [ 2%] 397s test/core/config/loader_test.py ............. [ 2%] 397s test/core/config/validate_test.py ....... [ 3%] 397s test/core/errors_test.py ...... [ 3%] 397s test/core/helpers/dict_test.py ..... [ 3%] 397s test/core/helpers/file_test.py .........s. [ 3%] 398s test/core/helpers/slice_test.py ...................... [ 3%] 398s test/core/helpers/string_test.py ....... [ 3%] 398s test/core/linter/discovery_test.py ............... [ 3%] 398s test/core/linter/fix_test.py ...... [ 3%] 398s test/core/linter/linted_file_test.py ................. [ 4%] 402s test/core/linter/linter_test.py ........................................ [ 4%] 402s ... [ 4%] 402s test/core/parser/grammar/grammar_anyof_test.py ................ [ 4%] 402s test/core/parser/grammar/grammar_other_test.py ......................... [ 5%] 402s ... [ 5%] 402s test/core/parser/grammar/grammar_ref_test.py .... [ 5%] 403s test/core/parser/grammar/grammar_sequence_test.py ...................... [ 5%] 403s ..................... [ 5%] 403s test/core/parser/helpers_test.py .... [ 5%] 403s test/core/parser/lexer_test.py .............................. [ 6%] 403s test/core/parser/markers_test.py ......... [ 6%] 403s test/core/parser/match_algorithms_test.py ...................... [ 6%] 403s test/core/parser/match_result_test.py ... [ 6%] 403s test/core/parser/parse_test.py ... [ 6%] 403s test/core/parser/parser_test.py ........... [ 6%] 403s test/core/parser/segments/segments_base_test.py ........................ [ 6%] 403s ... [ 6%] 403s test/core/parser/segments/segments_common_test.py . [ 6%] 403s test/core/parser/segments/segments_file_test.py . [ 6%] 403s test/core/parser/segments/segments_raw_test.py .. [ 6%] 404s test/core/rules/crawlers_test.py ... [ 7%] 404s test/core/rules/docstring_test.py ..... [ 7%] 404s test/core/rules/functional/raw_file_slices_test.py ...... [ 7%] 404s test/core/rules/functional/segments_test.py .................... [ 7%] 405s test/core/rules/noqa_test.py ........................................... [ 7%] 405s .... [ 7%] 405s test/core/rules/reference_test.py .............. [ 8%] 406s test/core/rules/rules_test.py ............................. [ 8%] 406s test/core/templaters/base_test.py ............................ [ 8%] 406s test/core/templaters/builtins_test.py .. [ 8%] 409s test/core/templaters/jinja_test.py ..................................... [ 9%] 412s ........................................................................ [ 10%] 413s ..... [ 10%] 413s test/core/templaters/placeholder_test.py ....................... [ 10%] 413s test/core/templaters/python_test.py .................................... [ 10%] 413s [ 10%] 414s test/dialects/ansi_test.py ............................................. [ 11%] 414s ........ [ 11%] 419s test/dialects/bigquery_test.py ...... [ 11%] 421s test/dialects/dialects_test.py ......................................... [ 11%] 425s ........................................................................ [ 12%] 429s ........................................................................ [ 13%] 434s ........................................................................ [ 14%] 440s ........................................................................ [ 15%] 449s ........................................................................ [ 16%] 463s ........................................................................ [ 17%] 468s ........................................................................ [ 17%] 477s ........................................................................ [ 18%] 483s ........................................................................ [ 19%] 488s ........................................................................ [ 20%] 494s ........................................................................ [ 21%] 499s ........................................................................ [ 22%] 504s ........................................................................ [ 22%] 510s ........................................................................ [ 23%] 527s ........................................................................ [ 24%] 539s ........................................................................ [ 25%] 550s ........................................................................ [ 26%] 556s ........................................................................ [ 27%] 573s ........................................................................ [ 28%] 581s ........................................................................ [ 28%] 595s ........................................................................ [ 29%] 603s ........................................................................ [ 30%] 614s ........................................................................ [ 31%] 625s ........................................................................ [ 32%] 637s ........................................................................ [ 33%] 646s ........................................................................ [ 33%] 659s ........................................................................ [ 34%] 671s ........................................................................ [ 35%] 687s ........................................................................ [ 36%] 718s ........................................................................ [ 37%] 757s ........................................................................ [ 38%] 776s ........................................................................ [ 39%] 804s ........................................................................ [ 39%] 821s ........................................................................ [ 40%] 832s ........................................................................ [ 41%] 841s ........................................................................ [ 42%] 854s ........................................................................ [ 43%] 861s ........................................................................ [ 44%] 869s ........................................................................ [ 44%] 920s ........................................................................ [ 45%] 955s ........................................................................ [ 46%] 984s ........................................................................ [ 47%] 1001s ........................................................................ [ 48%] 1060s ........................................................................ [ 49%] 1078s ........................................................................ [ 50%] 1107s ........................................................................ [ 50%] 1131s ........................................................................ [ 51%] 1162s ........................................................................ [ 52%] 1207s ........................................................................ [ 53%] 1248s ........................................................................ [ 54%] 1251s ........................................................................ [ 55%] 1254s ........................................................................ [ 55%] 1257s ........................................................................ [ 56%] 1261s ........................................................................ [ 57%] 1266s ........................................................................ [ 58%] 1275s ........................................................................ [ 59%] 1281s ........................................................................ [ 60%] 1286s ........................................................................ [ 61%] 1291s ........................................................................ [ 61%] 1294s ........................................................................ [ 62%] 1297s ........................................................................ [ 63%] 1301s ........................................................................ [ 64%] 1304s ........................................................................ [ 65%] 1307s ........................................................................ [ 66%] 1317s ........................................................................ [ 66%] 1327s ........................................................................ [ 67%] 1334s ........................................................................ [ 68%] 1339s ........................................................................ [ 69%] 1349s ........................................................................ [ 70%] 1354s ........................................................................ [ 71%] 1363s ........................................................................ [ 71%] 1369s ........................................................................ [ 72%] 1376s ........................................................................ [ 73%] 1382s ........................................................................ [ 74%] 1389s .................................................... [ 75%] 1389s test/dialects/exasol_test.py ... [ 75%] 1390s test/dialects/postgres_test.py ..................... [ 75%] 1391s test/dialects/snowflake_test.py ............... [ 75%] 1392s test/dialects/soql_test.py ...... [ 75%] 1392s test/dialects/unparsable_test.py ... [ 75%] 1393s test/diff_quality_plugin_test.py FFFF [ 75%] 1394s test/rules/std_AL04_test.py ... [ 75%] 1396s test/rules/std_AL09_CP02_RF06_combo_test.py .......... [ 75%] 1397s test/rules/std_AM06_test.py ... [ 75%] 1397s test/rules/std_CV02_test.py . [ 75%] 1397s test/rules/std_CV09_test.py . [ 75%] 1397s test/rules/std_JJ01_test.py . [ 75%] 1397s test/rules/std_LT01_LT02_LT09_combo_test.py . [ 75%] 1397s test/rules/std_LT01_LT04_test.py . [ 75%] 1397s test/rules/std_LT01_ST02_test.py . [ 76%] 1398s test/rules/std_LT02_LT04_test.py . [ 76%] 1398s test/rules/std_LT02_LT11_combo_test.py .. [ 76%] 1398s test/rules/std_LT03_test.py ... [ 76%] 1399s test/rules/std_LT04_ST06_test.py ... [ 76%] 1399s test/rules/std_LT04_test.py . [ 76%] 1399s test/rules/std_LT05_LT09_combo_test.py ... [ 76%] 1399s test/rules/std_LT12_CV06_test.py . [ 76%] 1399s test/rules/std_RF01_LT09_test.py . [ 76%] 1399s test/rules/std_RF02_test.py . [ 76%] 1399s test/rules/std_ST03_test.py . [ 76%] 1400s test/rules/std_ST05_LT08_test.py . [ 76%] 1400s test/rules/std_ST05_LT09_test.py .. [ 76%] 1409s test/rules/std_fix_auto_test.py ........................................ [ 76%] 1410s .... [ 76%] 1412s test/rules/std_roundtrip_test.py ........ [ 76%] 1413s test/rules/std_test.py ......................... [ 77%] 1421s test/rules/yaml_test_cases_test.py ..................................... [ 77%] 1432s ........................................................................ [ 78%] 1444s ........................................................................ [ 79%] 1458s ........................................................................ [ 80%] 1469s ........................................................................ [ 80%] 1480s ........................................................................ [ 81%] 1493s ........................................................................ [ 82%] 1508s ........................................................................ [ 83%] 1522s ........................................................................ [ 84%] 1537s ........................................................................ [ 85%] 1547s ........................................................................ [ 86%] 1566s ........................................................................ [ 86%] 1581s ........................................................................ [ 87%] 1602s ........................................................................ [ 88%] 1623s ........................................................................ [ 89%] 1642s ........................................................................ [ 90%] 1657s ........................................................................ [ 91%] 1673s ........................................................................ [ 91%] 1687s ........................................................................ [ 92%] 1698s ........................................................................ [ 93%] 1709s ........................................................................ [ 94%] 1717s ........................................................................ [ 95%] 1730s ........................................................................ [ 96%] 1749s ........................................................................ [ 97%] 1768s ........................................................................ [ 97%] 1775s ............................................... [ 98%] 1775s test/testing_test.py ...... [ 98%] 1777s test/utils/analysis/query_test.py ................. [ 98%] 1777s test/utils/reflow/depthmap_test.py ... [ 98%] 1779s test/utils/reflow/rebreak_test.py ................ [ 98%] 1782s test/utils/reflow/reindent_test.py ..................................... [ 99%] 1784s ....................... [ 99%] 1785s test/utils/reflow/respace_test.py .................. [ 99%] 1786s test/utils/reflow/sequence_test.py ............... [100%] 1786s 1786s =================================== FAILURES =================================== 1786s _________________________ test__cli__command_directed __________________________ 1786s 1786s def test__cli__command_directed(): 1786s """Basic checking of lint functionality.""" 1786s > result = invoke_assert_code( 1786s ret_code=1, 1786s args=[ 1786s lint, 1786s [ 1786s "--disable-progress-bar", 1786s "test/fixtures/linter/indentation_error_simple.sql", 1786s ], 1786s ], 1786s ) 1786s 1786s test/cli/commands_test.py:89: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 1 1786s args = [, ['--disable-progress-bar', 'test/fixtures/linter/indentation_error_simple.sql']] 1786s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s __________________________ test__cli__command_dialect __________________________ 1786s 1786s def test__cli__command_dialect(): 1786s """Check the script raises the right exception on an unknown dialect.""" 1786s # The dialect is unknown should be a non-zero exit code 1786s > invoke_assert_code( 1786s ret_code=2, 1786s args=[ 1786s lint, 1786s [ 1786s "-n", 1786s "--dialect", 1786s "faslkjh", 1786s "test/fixtures/linter/indentation_error_simple.sql", 1786s ], 1786s ], 1786s ) 1786s 1786s test/cli/commands_test.py:113: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 2 1786s args = [, ['-n', '--dialect', 'faslkjh', 'test/fixtures/linter/indentation_error_simple.sql']] 1786s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_no_dialect[command0] ____________________ 1786s 1786s command = 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s render, 1786s parse, 1786s lint, 1786s cli_format, 1786s fix, 1786s ], 1786s ) 1786s def test__cli__command_no_dialect(command): 1786s """Check the script raises the right exception no dialect.""" 1786s # The dialect is unknown should be a non-zero exit code 1786s > result = invoke_assert_code( 1786s ret_code=2, 1786s args=[ 1786s command, 1786s ["-"], 1786s ], 1786s cli_input="SELECT 1", 1786s ) 1786s 1786s test/cli/commands_test.py:140: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 2, args = [, ['-']], kwargs = {'input': 'SELECT 1'} 1786s cli_input = 'SELECT 1', mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_no_dialect[command1] ____________________ 1786s 1786s command = 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s render, 1786s parse, 1786s lint, 1786s cli_format, 1786s fix, 1786s ], 1786s ) 1786s def test__cli__command_no_dialect(command): 1786s """Check the script raises the right exception no dialect.""" 1786s # The dialect is unknown should be a non-zero exit code 1786s > result = invoke_assert_code( 1786s ret_code=2, 1786s args=[ 1786s command, 1786s ["-"], 1786s ], 1786s cli_input="SELECT 1", 1786s ) 1786s 1786s test/cli/commands_test.py:140: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 2, args = [, ['-']], kwargs = {'input': 'SELECT 1'} 1786s cli_input = 'SELECT 1', mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_no_dialect[command2] ____________________ 1786s 1786s command = 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s render, 1786s parse, 1786s lint, 1786s cli_format, 1786s fix, 1786s ], 1786s ) 1786s def test__cli__command_no_dialect(command): 1786s """Check the script raises the right exception no dialect.""" 1786s # The dialect is unknown should be a non-zero exit code 1786s > result = invoke_assert_code( 1786s ret_code=2, 1786s args=[ 1786s command, 1786s ["-"], 1786s ], 1786s cli_input="SELECT 1", 1786s ) 1786s 1786s test/cli/commands_test.py:140: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 2, args = [, ['-']], kwargs = {'input': 'SELECT 1'} 1786s cli_input = 'SELECT 1', mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_no_dialect[command3] ____________________ 1786s 1786s command = 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s render, 1786s parse, 1786s lint, 1786s cli_format, 1786s fix, 1786s ], 1786s ) 1786s def test__cli__command_no_dialect(command): 1786s """Check the script raises the right exception no dialect.""" 1786s # The dialect is unknown should be a non-zero exit code 1786s > result = invoke_assert_code( 1786s ret_code=2, 1786s args=[ 1786s command, 1786s ["-"], 1786s ], 1786s cli_input="SELECT 1", 1786s ) 1786s 1786s test/cli/commands_test.py:140: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 2, args = [, ['-']], kwargs = {'input': 'SELECT 1'} 1786s cli_input = 'SELECT 1', mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_no_dialect[command4] ____________________ 1786s 1786s command = 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s render, 1786s parse, 1786s lint, 1786s cli_format, 1786s fix, 1786s ], 1786s ) 1786s def test__cli__command_no_dialect(command): 1786s """Check the script raises the right exception no dialect.""" 1786s # The dialect is unknown should be a non-zero exit code 1786s > result = invoke_assert_code( 1786s ret_code=2, 1786s args=[ 1786s command, 1786s ["-"], 1786s ], 1786s cli_input="SELECT 1", 1786s ) 1786s 1786s test/cli/commands_test.py:140: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 2, args = [, ['-']], kwargs = {'input': 'SELECT 1'} 1786s cli_input = 'SELECT 1', mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________ test__cli__command_parse_error_dialect_explicit_warning ____________ 1786s 1786s def test__cli__command_parse_error_dialect_explicit_warning(): 1786s """Check parsing error raises the right warning.""" 1786s # For any parsing error there should be a non-zero exit code 1786s # and a human-readable warning should be displayed. 1786s # Dialect specified as commandline option. 1786s > invoke_assert_code( 1786s ret_code=1, 1786s args=[ 1786s parse, 1786s [ 1786s "-n", 1786s "--dialect", 1786s "postgres", 1786s "test/fixtures/cli/fail_many.sql", 1786s ], 1786s ], 1786s assert_output_contains=( 1786s "WARNING: Parsing errors found and dialect is set to 'postgres'. " 1786s "Have you configured your dialect correctly?" 1786s ), 1786s ) 1786s 1786s test/cli/commands_test.py:159: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 1 1786s args = [, ['-n', '--dialect', 'postgres', 'test/fixtures/cli/fail_many.sql']] 1786s kwargs = {}, cli_input = None, mix_stderr = True 1786s assert_output_contains = "WARNING: Parsing errors found and dialect is set to 'postgres'. Have you configured your dialect correctly?" 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________ test__cli__command_parse_error_dialect_implicit_warning ____________ 1786s 1786s def test__cli__command_parse_error_dialect_implicit_warning(): 1786s """Check parsing error raises the right warning.""" 1786s # For any parsing error there should be a non-zero exit code 1786s # and a human-readable warning should be displayed. 1786s # Dialect specified in .sqlfluff config. 1786s > invoke_assert_code( 1786s ret_code=1, 1786s args=[ 1786s # Config sets dialect to tsql 1786s parse, 1786s [ 1786s "-n", 1786s "--config", 1786s "test/fixtures/cli/extra_configs/.sqlfluff", 1786s "test/fixtures/cli/fail_many.sql", 1786s ], 1786s ], 1786s assert_output_contains=( 1786s "WARNING: Parsing errors found and dialect is set to 'tsql'. " 1786s "Have you configured your dialect correctly?" 1786s ), 1786s ) 1786s 1786s test/cli/commands_test.py:182: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 1 1786s args = [, ['-n', '--config', 'test/fixtures/cli/extra_configs/.sqlfluff', 'test/fixtures/cli/fail_many.sql']] 1786s kwargs = {}, cli_input = None, mix_stderr = True 1786s assert_output_contains = "WARNING: Parsing errors found and dialect is set to 'tsql'. Have you configured your dialect correctly?" 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ______________________ test__cli__command_dialect_legacy _______________________ 1786s 1786s def test__cli__command_dialect_legacy(): 1786s """Check the script raises the right exception on a legacy dialect.""" 1786s > invoke_assert_code( 1786s ret_code=2, 1786s args=[ 1786s lint, 1786s [ 1786s "-n", 1786s "--dialect", 1786s "exasol_fs", 1786s "test/fixtures/linter/indentation_error_simple.sql", 1786s ], 1786s ], 1786s assert_output_contains="Please use the 'exasol' dialect instead.", 1786s ) 1786s 1786s test/cli/commands_test.py:203: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 2 1786s args = [, ['-n', '--dialect', 'exasol_fs', 'test/fixtures/linter/indentation_error_simple.sql']] 1786s kwargs = {}, cli_input = None, mix_stderr = True 1786s assert_output_contains = "Please use the 'exasol' dialect instead." 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s _____________________ test__cli__command_extra_config_fail _____________________ 1786s 1786s def test__cli__command_extra_config_fail(): 1786s """Check the script raises the right exception non-existent extra config path.""" 1786s > invoke_assert_code( 1786s ret_code=2, 1786s args=[ 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/.sqlfluffsdfdfdfsfd", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ], 1786s assert_output_contains=( 1786s "Extra config path 'test/fixtures/cli/extra_configs/.sqlfluffsdfdfdfsfd' " 1786s "does not exist." 1786s ), 1786s ) 1786s 1786s test/cli/commands_test.py:220: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 2 1786s args = [, ['--config', 'test/fixtures/cli/extra_configs/.sqlfluffsdfdfdfsfd', 'test/fixtures/cli/extra_config_tsql.sql']] 1786s kwargs = {}, cli_input = None, mix_stderr = True 1786s assert_output_contains = "Extra config path 'test/fixtures/cli/extra_configs/.sqlfluffsdfdfdfsfd' does not exist." 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s _ test__cli__command_stdin_filename_config[command0-test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql-0-[L: 5, P: 1] | join_clause:\n[L: 5, P: 1] | keyword: 'POSITIONAL'] _ 1786s 1786s command = 1786s stdin_filepath = 'test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql' 1786s ret_code = 0 1786s output = "[L: 5, P: 1] | join_clause:\n[L: 5, P: 1] | keyword: 'POSITIONAL'" 1786s 1786s @pytest.mark.parametrize( 1786s ("command", "stdin_filepath", "ret_code", "output"), 1786s [ 1786s ( 1786s parse, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s ( 1786s "[L: 5, P: 1] | join_clause:\n" 1786s "[L: 5, P: 1] | keyword:" 1786s " 'POSITIONAL'" 1786s ), 1786s ), 1786s ( 1786s parse, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "[1 templating/parsing errors found]", 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Unfixable violations detected.", 1786s ), 1786s ], 1786s ) 1786s def test__cli__command_stdin_filename_config(command, stdin_filepath, ret_code, output): 1786s """Check the script picks up the config from the indicated path.""" 1786s > invoke_assert_code( 1786s ret_code=ret_code, 1786s args=[ 1786s command, 1786s [ 1786s "--stdin-filename", 1786s stdin_filepath, 1786s "-", 1786s ], 1786s ], 1786s cli_input=stdin_cli_input, 1786s assert_output_contains=output, 1786s ) 1786s 1786s test/cli/commands_test.py:319: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0 1786s args = [, ['--stdin-filename', 'test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql', '-']] 1786s kwargs = {'input': 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n'} 1786s cli_input = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s mix_stderr = True 1786s assert_output_contains = "[L: 5, P: 1] | join_clause:\n[L: 5, P: 1] | keyword: 'POSITIONAL'" 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s _ test__cli__command_stdin_filename_config[command1-test/fixtures/an_ansi_config_here.sql-1-Parsing errors found and dialect is set to 'ansi'.] _ 1786s 1786s command = 1786s stdin_filepath = 'test/fixtures/an_ansi_config_here.sql', ret_code = 1 1786s output = "Parsing errors found and dialect is set to 'ansi'." 1786s 1786s @pytest.mark.parametrize( 1786s ("command", "stdin_filepath", "ret_code", "output"), 1786s [ 1786s ( 1786s parse, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s ( 1786s "[L: 5, P: 1] | join_clause:\n" 1786s "[L: 5, P: 1] | keyword:" 1786s " 'POSITIONAL'" 1786s ), 1786s ), 1786s ( 1786s parse, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "[1 templating/parsing errors found]", 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Unfixable violations detected.", 1786s ), 1786s ], 1786s ) 1786s def test__cli__command_stdin_filename_config(command, stdin_filepath, ret_code, output): 1786s """Check the script picks up the config from the indicated path.""" 1786s > invoke_assert_code( 1786s ret_code=ret_code, 1786s args=[ 1786s command, 1786s [ 1786s "--stdin-filename", 1786s stdin_filepath, 1786s "-", 1786s ], 1786s ], 1786s cli_input=stdin_cli_input, 1786s assert_output_contains=output, 1786s ) 1786s 1786s test/cli/commands_test.py:319: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 1 1786s args = [, ['--stdin-filename', 'test/fixtures/an_ansi_config_here.sql', '-']] 1786s kwargs = {'input': 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n'} 1786s cli_input = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s mix_stderr = True 1786s assert_output_contains = "Parsing errors found and dialect is set to 'ansi'." 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s _ test__cli__command_stdin_filename_config[command2-test/fixtures/cli/stdin_filename/stdin_filename.sql-0-All Finished!] _ 1786s 1786s command = 1786s stdin_filepath = 'test/fixtures/cli/stdin_filename/stdin_filename.sql' 1786s ret_code = 0, output = 'All Finished!' 1786s 1786s @pytest.mark.parametrize( 1786s ("command", "stdin_filepath", "ret_code", "output"), 1786s [ 1786s ( 1786s parse, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s ( 1786s "[L: 5, P: 1] | join_clause:\n" 1786s "[L: 5, P: 1] | keyword:" 1786s " 'POSITIONAL'" 1786s ), 1786s ), 1786s ( 1786s parse, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "[1 templating/parsing errors found]", 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Unfixable violations detected.", 1786s ), 1786s ], 1786s ) 1786s def test__cli__command_stdin_filename_config(command, stdin_filepath, ret_code, output): 1786s """Check the script picks up the config from the indicated path.""" 1786s > invoke_assert_code( 1786s ret_code=ret_code, 1786s args=[ 1786s command, 1786s [ 1786s "--stdin-filename", 1786s stdin_filepath, 1786s "-", 1786s ], 1786s ], 1786s cli_input=stdin_cli_input, 1786s assert_output_contains=output, 1786s ) 1786s 1786s test/cli/commands_test.py:319: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0 1786s args = [, ['--stdin-filename', 'test/fixtures/cli/stdin_filename/stdin_filename.sql', '-']] 1786s kwargs = {'input': 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n'} 1786s cli_input = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s mix_stderr = True, assert_output_contains = 'All Finished!' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s _ test__cli__command_stdin_filename_config[command3-test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql-0-All Finished!] _ 1786s 1786s command = 1786s stdin_filepath = 'test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql' 1786s ret_code = 0, output = 'All Finished!' 1786s 1786s @pytest.mark.parametrize( 1786s ("command", "stdin_filepath", "ret_code", "output"), 1786s [ 1786s ( 1786s parse, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s ( 1786s "[L: 5, P: 1] | join_clause:\n" 1786s "[L: 5, P: 1] | keyword:" 1786s " 'POSITIONAL'" 1786s ), 1786s ), 1786s ( 1786s parse, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "[1 templating/parsing errors found]", 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Unfixable violations detected.", 1786s ), 1786s ], 1786s ) 1786s def test__cli__command_stdin_filename_config(command, stdin_filepath, ret_code, output): 1786s """Check the script picks up the config from the indicated path.""" 1786s > invoke_assert_code( 1786s ret_code=ret_code, 1786s args=[ 1786s command, 1786s [ 1786s "--stdin-filename", 1786s stdin_filepath, 1786s "-", 1786s ], 1786s ], 1786s cli_input=stdin_cli_input, 1786s assert_output_contains=output, 1786s ) 1786s 1786s test/cli/commands_test.py:319: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0 1786s args = [, ['--stdin-filename', 'test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql', '-']] 1786s kwargs = {'input': 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n'} 1786s cli_input = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s mix_stderr = True, assert_output_contains = 'All Finished!' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s _ test__cli__command_stdin_filename_config[command4-test/fixtures/an_ansi_config_here.sql-1-Parsing errors found and dialect is set to 'ansi'.] _ 1786s 1786s command = 1786s stdin_filepath = 'test/fixtures/an_ansi_config_here.sql', ret_code = 1 1786s output = "Parsing errors found and dialect is set to 'ansi'." 1786s 1786s @pytest.mark.parametrize( 1786s ("command", "stdin_filepath", "ret_code", "output"), 1786s [ 1786s ( 1786s parse, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s ( 1786s "[L: 5, P: 1] | join_clause:\n" 1786s "[L: 5, P: 1] | keyword:" 1786s " 'POSITIONAL'" 1786s ), 1786s ), 1786s ( 1786s parse, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "[1 templating/parsing errors found]", 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Unfixable violations detected.", 1786s ), 1786s ], 1786s ) 1786s def test__cli__command_stdin_filename_config(command, stdin_filepath, ret_code, output): 1786s """Check the script picks up the config from the indicated path.""" 1786s > invoke_assert_code( 1786s ret_code=ret_code, 1786s args=[ 1786s command, 1786s [ 1786s "--stdin-filename", 1786s stdin_filepath, 1786s "-", 1786s ], 1786s ], 1786s cli_input=stdin_cli_input, 1786s assert_output_contains=output, 1786s ) 1786s 1786s test/cli/commands_test.py:319: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 1 1786s args = [, ['--stdin-filename', 'test/fixtures/an_ansi_config_here.sql', '-']] 1786s kwargs = {'input': 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n'} 1786s cli_input = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s mix_stderr = True 1786s assert_output_contains = "Parsing errors found and dialect is set to 'ansi'." 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s _ test__cli__command_stdin_filename_config[command5-test/fixtures/cli/stdin_filename/stdin_filename.sql-0-SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n] _ 1786s 1786s command = 1786s stdin_filepath = 'test/fixtures/cli/stdin_filename/stdin_filename.sql' 1786s ret_code = 0 1786s output = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s 1786s @pytest.mark.parametrize( 1786s ("command", "stdin_filepath", "ret_code", "output"), 1786s [ 1786s ( 1786s parse, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s ( 1786s "[L: 5, P: 1] | join_clause:\n" 1786s "[L: 5, P: 1] | keyword:" 1786s " 'POSITIONAL'" 1786s ), 1786s ), 1786s ( 1786s parse, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "[1 templating/parsing errors found]", 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Unfixable violations detected.", 1786s ), 1786s ], 1786s ) 1786s def test__cli__command_stdin_filename_config(command, stdin_filepath, ret_code, output): 1786s """Check the script picks up the config from the indicated path.""" 1786s > invoke_assert_code( 1786s ret_code=ret_code, 1786s args=[ 1786s command, 1786s [ 1786s "--stdin-filename", 1786s stdin_filepath, 1786s "-", 1786s ], 1786s ], 1786s cli_input=stdin_cli_input, 1786s assert_output_contains=output, 1786s ) 1786s 1786s test/cli/commands_test.py:319: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0 1786s args = [, ['--stdin-filename', 'test/fixtures/cli/stdin_filename/stdin_filename.sql', '-']] 1786s kwargs = {'input': 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n'} 1786s cli_input = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s mix_stderr = True 1786s assert_output_contains = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s _ test__cli__command_stdin_filename_config[command6-test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql-0-SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n] _ 1786s 1786s command = 1786s stdin_filepath = 'test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql' 1786s ret_code = 0 1786s output = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s 1786s @pytest.mark.parametrize( 1786s ("command", "stdin_filepath", "ret_code", "output"), 1786s [ 1786s ( 1786s parse, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s ( 1786s "[L: 5, P: 1] | join_clause:\n" 1786s "[L: 5, P: 1] | keyword:" 1786s " 'POSITIONAL'" 1786s ), 1786s ), 1786s ( 1786s parse, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "[1 templating/parsing errors found]", 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Unfixable violations detected.", 1786s ), 1786s ], 1786s ) 1786s def test__cli__command_stdin_filename_config(command, stdin_filepath, ret_code, output): 1786s """Check the script picks up the config from the indicated path.""" 1786s > invoke_assert_code( 1786s ret_code=ret_code, 1786s args=[ 1786s command, 1786s [ 1786s "--stdin-filename", 1786s stdin_filepath, 1786s "-", 1786s ], 1786s ], 1786s cli_input=stdin_cli_input, 1786s assert_output_contains=output, 1786s ) 1786s 1786s test/cli/commands_test.py:319: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0 1786s args = [, ['--stdin-filename', 'test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql', '-']] 1786s kwargs = {'input': 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n'} 1786s cli_input = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s mix_stderr = True 1786s assert_output_contains = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s _ test__cli__command_stdin_filename_config[command7-test/fixtures/an_ansi_config_here.sql-1-[1 templating/parsing errors found]] _ 1786s 1786s command = 1786s stdin_filepath = 'test/fixtures/an_ansi_config_here.sql', ret_code = 1 1786s output = '[1 templating/parsing errors found]' 1786s 1786s @pytest.mark.parametrize( 1786s ("command", "stdin_filepath", "ret_code", "output"), 1786s [ 1786s ( 1786s parse, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s ( 1786s "[L: 5, P: 1] | join_clause:\n" 1786s "[L: 5, P: 1] | keyword:" 1786s " 'POSITIONAL'" 1786s ), 1786s ), 1786s ( 1786s parse, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "[1 templating/parsing errors found]", 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Unfixable violations detected.", 1786s ), 1786s ], 1786s ) 1786s def test__cli__command_stdin_filename_config(command, stdin_filepath, ret_code, output): 1786s """Check the script picks up the config from the indicated path.""" 1786s > invoke_assert_code( 1786s ret_code=ret_code, 1786s args=[ 1786s command, 1786s [ 1786s "--stdin-filename", 1786s stdin_filepath, 1786s "-", 1786s ], 1786s ], 1786s cli_input=stdin_cli_input, 1786s assert_output_contains=output, 1786s ) 1786s 1786s test/cli/commands_test.py:319: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 1 1786s args = [, ['--stdin-filename', 'test/fixtures/an_ansi_config_here.sql', '-']] 1786s kwargs = {'input': 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n'} 1786s cli_input = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s mix_stderr = True 1786s assert_output_contains = '[1 templating/parsing errors found]' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s _ test__cli__command_stdin_filename_config[command8-test/fixtures/cli/stdin_filename/stdin_filename.sql-0-SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n] _ 1786s 1786s command = 1786s stdin_filepath = 'test/fixtures/cli/stdin_filename/stdin_filename.sql' 1786s ret_code = 0 1786s output = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s 1786s @pytest.mark.parametrize( 1786s ("command", "stdin_filepath", "ret_code", "output"), 1786s [ 1786s ( 1786s parse, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s ( 1786s "[L: 5, P: 1] | join_clause:\n" 1786s "[L: 5, P: 1] | keyword:" 1786s " 'POSITIONAL'" 1786s ), 1786s ), 1786s ( 1786s parse, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "[1 templating/parsing errors found]", 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Unfixable violations detected.", 1786s ), 1786s ], 1786s ) 1786s def test__cli__command_stdin_filename_config(command, stdin_filepath, ret_code, output): 1786s """Check the script picks up the config from the indicated path.""" 1786s > invoke_assert_code( 1786s ret_code=ret_code, 1786s args=[ 1786s command, 1786s [ 1786s "--stdin-filename", 1786s stdin_filepath, 1786s "-", 1786s ], 1786s ], 1786s cli_input=stdin_cli_input, 1786s assert_output_contains=output, 1786s ) 1786s 1786s test/cli/commands_test.py:319: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0 1786s args = [, ['--stdin-filename', 'test/fixtures/cli/stdin_filename/stdin_filename.sql', '-']] 1786s kwargs = {'input': 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n'} 1786s cli_input = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s mix_stderr = True 1786s assert_output_contains = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s _ test__cli__command_stdin_filename_config[command9-test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql-0-SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n] _ 1786s 1786s command = 1786s stdin_filepath = 'test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql' 1786s ret_code = 0 1786s output = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s 1786s @pytest.mark.parametrize( 1786s ("command", "stdin_filepath", "ret_code", "output"), 1786s [ 1786s ( 1786s parse, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s ( 1786s "[L: 5, P: 1] | join_clause:\n" 1786s "[L: 5, P: 1] | keyword:" 1786s " 'POSITIONAL'" 1786s ), 1786s ), 1786s ( 1786s parse, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "[1 templating/parsing errors found]", 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Unfixable violations detected.", 1786s ), 1786s ], 1786s ) 1786s def test__cli__command_stdin_filename_config(command, stdin_filepath, ret_code, output): 1786s """Check the script picks up the config from the indicated path.""" 1786s > invoke_assert_code( 1786s ret_code=ret_code, 1786s args=[ 1786s command, 1786s [ 1786s "--stdin-filename", 1786s stdin_filepath, 1786s "-", 1786s ], 1786s ], 1786s cli_input=stdin_cli_input, 1786s assert_output_contains=output, 1786s ) 1786s 1786s test/cli/commands_test.py:319: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0 1786s args = [, ['--stdin-filename', 'test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql', '-']] 1786s kwargs = {'input': 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n'} 1786s cli_input = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s mix_stderr = True 1786s assert_output_contains = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s _ test__cli__command_stdin_filename_config[command10-test/fixtures/an_ansi_config_here.sql-1-Unfixable violations detected.] _ 1786s 1786s command = 1786s stdin_filepath = 'test/fixtures/an_ansi_config_here.sql', ret_code = 1 1786s output = 'Unfixable violations detected.' 1786s 1786s @pytest.mark.parametrize( 1786s ("command", "stdin_filepath", "ret_code", "output"), 1786s [ 1786s ( 1786s parse, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s ( 1786s "[L: 5, P: 1] | join_clause:\n" 1786s "[L: 5, P: 1] | keyword:" 1786s " 'POSITIONAL'" 1786s ), 1786s ), 1786s ( 1786s parse, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s "All Finished!", 1786s ), 1786s ( 1786s lint, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Parsing errors found and dialect is set to 'ansi'.", 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s cli_format, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "[1 templating/parsing errors found]", 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql", 1786s 0, 1786s stdin_cli_input, 1786s ), 1786s ( 1786s fix, 1786s "test/fixtures/an_ansi_config_here.sql", 1786s 1, 1786s "Unfixable violations detected.", 1786s ), 1786s ], 1786s ) 1786s def test__cli__command_stdin_filename_config(command, stdin_filepath, ret_code, output): 1786s """Check the script picks up the config from the indicated path.""" 1786s > invoke_assert_code( 1786s ret_code=ret_code, 1786s args=[ 1786s command, 1786s [ 1786s "--stdin-filename", 1786s stdin_filepath, 1786s "-", 1786s ], 1786s ], 1786s cli_input=stdin_cli_input, 1786s assert_output_contains=output, 1786s ) 1786s 1786s test/cli/commands_test.py:319: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 1 1786s args = [, ['--stdin-filename', 'test/fixtures/an_ansi_config_here.sql', '-']] 1786s kwargs = {'input': 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n'} 1786s cli_input = 'SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n' 1786s mix_stderr = True, assert_output_contains = 'Unfixable violations detected.' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_lint_stdin[command0] ____________________ 1786s 1786s command = ('-', '-n') 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s ( 1786s "-", 1786s "-n", 1786s ), 1786s ( 1786s "-", 1786s "-n", 1786s "-v", 1786s ), 1786s ( 1786s "-", 1786s "-n", 1786s "-vv", 1786s ), 1786s ( 1786s "-", 1786s "-vv", 1786s ), 1786s ], 1786s ) 1786s def test__cli__command_lint_stdin(command): 1786s """Check basic commands on a simple script using stdin. 1786s 1786s The subprocess command should exit without errors, as no issues should be found. 1786s """ 1786s with open("test/fixtures/cli/passing_a.sql") as test_file: 1786s sql = test_file.read() 1786s > invoke_assert_code(args=[lint, ("--dialect=ansi",) + command], cli_input=sql) 1786s 1786s test/cli/commands_test.py:364: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0, args = [, ('--dialect=ansi', '-', '-n')] 1786s kwargs = {'input': 'SELECT\n tbl.name,\n tbl.value\nFROM tbl\n'} 1786s cli_input = 'SELECT\n tbl.name,\n tbl.value\nFROM tbl\n' 1786s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_lint_stdin[command1] ____________________ 1786s 1786s command = ('-', '-n', '-v') 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s ( 1786s "-", 1786s "-n", 1786s ), 1786s ( 1786s "-", 1786s "-n", 1786s "-v", 1786s ), 1786s ( 1786s "-", 1786s "-n", 1786s "-vv", 1786s ), 1786s ( 1786s "-", 1786s "-vv", 1786s ), 1786s ], 1786s ) 1786s def test__cli__command_lint_stdin(command): 1786s """Check basic commands on a simple script using stdin. 1786s 1786s The subprocess command should exit without errors, as no issues should be found. 1786s """ 1786s with open("test/fixtures/cli/passing_a.sql") as test_file: 1786s sql = test_file.read() 1786s > invoke_assert_code(args=[lint, ("--dialect=ansi",) + command], cli_input=sql) 1786s 1786s test/cli/commands_test.py:364: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0, args = [, ('--dialect=ansi', '-', '-n', '-v')] 1786s kwargs = {'input': 'SELECT\n tbl.name,\n tbl.value\nFROM tbl\n'} 1786s cli_input = 'SELECT\n tbl.name,\n tbl.value\nFROM tbl\n' 1786s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_lint_stdin[command2] ____________________ 1786s 1786s command = ('-', '-n', '-vv') 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s ( 1786s "-", 1786s "-n", 1786s ), 1786s ( 1786s "-", 1786s "-n", 1786s "-v", 1786s ), 1786s ( 1786s "-", 1786s "-n", 1786s "-vv", 1786s ), 1786s ( 1786s "-", 1786s "-vv", 1786s ), 1786s ], 1786s ) 1786s def test__cli__command_lint_stdin(command): 1786s """Check basic commands on a simple script using stdin. 1786s 1786s The subprocess command should exit without errors, as no issues should be found. 1786s """ 1786s with open("test/fixtures/cli/passing_a.sql") as test_file: 1786s sql = test_file.read() 1786s > invoke_assert_code(args=[lint, ("--dialect=ansi",) + command], cli_input=sql) 1786s 1786s test/cli/commands_test.py:364: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0, args = [, ('--dialect=ansi', '-', '-n', '-vv')] 1786s kwargs = {'input': 'SELECT\n tbl.name,\n tbl.value\nFROM tbl\n'} 1786s cli_input = 'SELECT\n tbl.name,\n tbl.value\nFROM tbl\n' 1786s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_lint_stdin[command3] ____________________ 1786s 1786s command = ('-', '-vv') 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s ( 1786s "-", 1786s "-n", 1786s ), 1786s ( 1786s "-", 1786s "-n", 1786s "-v", 1786s ), 1786s ( 1786s "-", 1786s "-n", 1786s "-vv", 1786s ), 1786s ( 1786s "-", 1786s "-vv", 1786s ), 1786s ], 1786s ) 1786s def test__cli__command_lint_stdin(command): 1786s """Check basic commands on a simple script using stdin. 1786s 1786s The subprocess command should exit without errors, as no issues should be found. 1786s """ 1786s with open("test/fixtures/cli/passing_a.sql") as test_file: 1786s sql = test_file.read() 1786s > invoke_assert_code(args=[lint, ("--dialect=ansi",) + command], cli_input=sql) 1786s 1786s test/cli/commands_test.py:364: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0, args = [, ('--dialect=ansi', '-', '-vv')] 1786s kwargs = {'input': 'SELECT\n tbl.name,\n tbl.value\nFROM tbl\n'} 1786s cli_input = 'SELECT\n tbl.name,\n tbl.value\nFROM tbl\n' 1786s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s _____________________ test__cli__command_lint_empty_stdin ______________________ 1786s 1786s def test__cli__command_lint_empty_stdin(): 1786s """Check linting an empty file raises no exceptions. 1786s 1786s https://github.com/sqlfluff/sqlfluff/issues/4807 1786s """ 1786s > invoke_assert_code(args=[lint, ("-d", "ansi", "-")], cli_input="") 1786s 1786s test/cli/commands_test.py:372: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0, args = [, ('-d', 'ansi', '-')], kwargs = {} 1786s cli_input = '', mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s _______________________ test__cli__command_render_stdin ________________________ 1786s 1786s def test__cli__command_render_stdin(): 1786s """Check render on a simple script using stdin.""" 1786s with open("test/fixtures/cli/passing_a.sql") as test_file: 1786s sql = test_file.read() 1786s 1786s > invoke_assert_code( 1786s args=[render, ("--dialect=ansi", "-")], 1786s cli_input=sql, 1786s # Check we get back out the same file we input. 1786s assert_output_contains=sql, 1786s ) 1786s 1786s test/cli/commands_test.py:380: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0, args = [, ('--dialect=ansi', '-')] 1786s kwargs = {'input': 'SELECT\n tbl.name,\n tbl.value\nFROM tbl\n'} 1786s cli_input = 'SELECT\n tbl.name,\n tbl.value\nFROM tbl\n' 1786s mix_stderr = True 1786s assert_output_contains = 'SELECT\n tbl.name,\n tbl.value\nFROM tbl\n' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_lint_parse[command0] ____________________ 1786s 1786s command = (, ['-n', 'test/fixtures/cli/passing_b.sql', '--exclude-rules', 'AM05']) 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s # Test basic linting 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Basic render 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/passing_b.sql", 1786s ], 1786s ), 1786s # Render with variants 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Original tests from test__cli__command_lint 1786s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s # Test basic linting with very high verbosity 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic linting with specific logger. 1786s # Also test short rule exclusion. 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvv", 1786s "--logger", 1786s "parser", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic parsing with very high verbosity 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing, with the code only option 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1786s # Check basic parsing, with the yaml output 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1786s # Check parsing with no output (used mostly for testing) 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1786s # Parsing with variants 1786s ( 1786s parse, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Check the benching commands 1786s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s # Check linting works in specifying rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check ignoring linting (multiprocess) 1786s # https://github.com/sqlfluff/sqlfluff/issues/5066 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--ignore", 1786s "linting", 1786s "-p", 1786s "2", 1786s "test/fixtures/linter/operator_errors.sql", 1786s "test/fixtures/linter/comma_errors.sql", 1786s ], 1786s ), 1786s # Check linting works in specifying multiple rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT02", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with both included and excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT01", 1786s "--exclude-rules", 1786s "LT01,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with just excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT01,LT03,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check that ignoring works (also checks that unicode files parse). 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT02,LT12,AL07", 1786s "--ignore", 1786s "parsing,lexing", 1786s "test/fixtures/linter/parse_lex_error.sql", 1786s ], 1786s ), 1786s # Check nofail works 1786s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1786s # Check config works (sets dialect to tsql) 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/.sqlfluff", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/pyproject.toml", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s # Check timing outputs doesn't raise exceptions 1786s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1786s # Check lint --help command doesn't raise exception. 1786s # NOTE: This tests the LazySequence in action. 1786s (lint, ["--help"]), 1786s ], 1786s ) 1786s def test__cli__command_lint_parse(command): 1786s """Check basic commands on a more complicated script.""" 1786s > invoke_assert_code(args=command) 1786s 1786s test/cli/commands_test.py:580: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0 1786s args = (, ['-n', 'test/fixtures/cli/passing_b.sql', '--exclude-rules', 'AM05']) 1786s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_lint_parse[command1] ____________________ 1786s 1786s command = (, ['test/fixtures/cli/passing_b.sql']) 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s # Test basic linting 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Basic render 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/passing_b.sql", 1786s ], 1786s ), 1786s # Render with variants 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Original tests from test__cli__command_lint 1786s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s # Test basic linting with very high verbosity 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic linting with specific logger. 1786s # Also test short rule exclusion. 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvv", 1786s "--logger", 1786s "parser", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic parsing with very high verbosity 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing, with the code only option 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1786s # Check basic parsing, with the yaml output 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1786s # Check parsing with no output (used mostly for testing) 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1786s # Parsing with variants 1786s ( 1786s parse, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Check the benching commands 1786s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s # Check linting works in specifying rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check ignoring linting (multiprocess) 1786s # https://github.com/sqlfluff/sqlfluff/issues/5066 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--ignore", 1786s "linting", 1786s "-p", 1786s "2", 1786s "test/fixtures/linter/operator_errors.sql", 1786s "test/fixtures/linter/comma_errors.sql", 1786s ], 1786s ), 1786s # Check linting works in specifying multiple rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT02", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with both included and excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT01", 1786s "--exclude-rules", 1786s "LT01,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with just excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT01,LT03,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check that ignoring works (also checks that unicode files parse). 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT02,LT12,AL07", 1786s "--ignore", 1786s "parsing,lexing", 1786s "test/fixtures/linter/parse_lex_error.sql", 1786s ], 1786s ), 1786s # Check nofail works 1786s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1786s # Check config works (sets dialect to tsql) 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/.sqlfluff", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/pyproject.toml", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s # Check timing outputs doesn't raise exceptions 1786s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1786s # Check lint --help command doesn't raise exception. 1786s # NOTE: This tests the LazySequence in action. 1786s (lint, ["--help"]), 1786s ], 1786s ) 1786s def test__cli__command_lint_parse(command): 1786s """Check basic commands on a more complicated script.""" 1786s > invoke_assert_code(args=command) 1786s 1786s test/cli/commands_test.py:580: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0, args = (, ['test/fixtures/cli/passing_b.sql']) 1786s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_lint_parse[command2] ____________________ 1786s 1786s command = (, ['test/fixtures/cli/jinja_variants.sql']) 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s # Test basic linting 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Basic render 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/passing_b.sql", 1786s ], 1786s ), 1786s # Render with variants 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Original tests from test__cli__command_lint 1786s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s # Test basic linting with very high verbosity 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic linting with specific logger. 1786s # Also test short rule exclusion. 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvv", 1786s "--logger", 1786s "parser", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic parsing with very high verbosity 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing, with the code only option 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1786s # Check basic parsing, with the yaml output 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1786s # Check parsing with no output (used mostly for testing) 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1786s # Parsing with variants 1786s ( 1786s parse, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Check the benching commands 1786s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s # Check linting works in specifying rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check ignoring linting (multiprocess) 1786s # https://github.com/sqlfluff/sqlfluff/issues/5066 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--ignore", 1786s "linting", 1786s "-p", 1786s "2", 1786s "test/fixtures/linter/operator_errors.sql", 1786s "test/fixtures/linter/comma_errors.sql", 1786s ], 1786s ), 1786s # Check linting works in specifying multiple rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT02", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with both included and excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT01", 1786s "--exclude-rules", 1786s "LT01,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with just excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT01,LT03,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check that ignoring works (also checks that unicode files parse). 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT02,LT12,AL07", 1786s "--ignore", 1786s "parsing,lexing", 1786s "test/fixtures/linter/parse_lex_error.sql", 1786s ], 1786s ), 1786s # Check nofail works 1786s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1786s # Check config works (sets dialect to tsql) 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/.sqlfluff", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/pyproject.toml", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s # Check timing outputs doesn't raise exceptions 1786s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1786s # Check lint --help command doesn't raise exception. 1786s # NOTE: This tests the LazySequence in action. 1786s (lint, ["--help"]), 1786s ], 1786s ) 1786s def test__cli__command_lint_parse(command): 1786s """Check basic commands on a more complicated script.""" 1786s > invoke_assert_code(args=command) 1786s 1786s test/cli/commands_test.py:580: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0 1786s args = (, ['test/fixtures/cli/jinja_variants.sql']), kwargs = {} 1786s cli_input = None, mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_lint_parse[command3] ____________________ 1786s 1786s command = (, ['-n', 'test/fixtures/cli/passing_a.sql']) 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s # Test basic linting 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Basic render 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/passing_b.sql", 1786s ], 1786s ), 1786s # Render with variants 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Original tests from test__cli__command_lint 1786s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s # Test basic linting with very high verbosity 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic linting with specific logger. 1786s # Also test short rule exclusion. 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvv", 1786s "--logger", 1786s "parser", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic parsing with very high verbosity 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing, with the code only option 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1786s # Check basic parsing, with the yaml output 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1786s # Check parsing with no output (used mostly for testing) 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1786s # Parsing with variants 1786s ( 1786s parse, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Check the benching commands 1786s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s # Check linting works in specifying rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check ignoring linting (multiprocess) 1786s # https://github.com/sqlfluff/sqlfluff/issues/5066 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--ignore", 1786s "linting", 1786s "-p", 1786s "2", 1786s "test/fixtures/linter/operator_errors.sql", 1786s "test/fixtures/linter/comma_errors.sql", 1786s ], 1786s ), 1786s # Check linting works in specifying multiple rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT02", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with both included and excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT01", 1786s "--exclude-rules", 1786s "LT01,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with just excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT01,LT03,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check that ignoring works (also checks that unicode files parse). 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT02,LT12,AL07", 1786s "--ignore", 1786s "parsing,lexing", 1786s "test/fixtures/linter/parse_lex_error.sql", 1786s ], 1786s ), 1786s # Check nofail works 1786s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1786s # Check config works (sets dialect to tsql) 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/.sqlfluff", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/pyproject.toml", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s # Check timing outputs doesn't raise exceptions 1786s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1786s # Check lint --help command doesn't raise exception. 1786s # NOTE: This tests the LazySequence in action. 1786s (lint, ["--help"]), 1786s ], 1786s ) 1786s def test__cli__command_lint_parse(command): 1786s """Check basic commands on a more complicated script.""" 1786s > invoke_assert_code(args=command) 1786s 1786s test/cli/commands_test.py:580: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0, args = (, ['-n', 'test/fixtures/cli/passing_a.sql']) 1786s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_lint_parse[command4] ____________________ 1786s 1786s command = (, ['-n', '-v', 'test/fixtures/cli/passing_a.sql']) 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s # Test basic linting 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Basic render 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/passing_b.sql", 1786s ], 1786s ), 1786s # Render with variants 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Original tests from test__cli__command_lint 1786s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s # Test basic linting with very high verbosity 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic linting with specific logger. 1786s # Also test short rule exclusion. 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvv", 1786s "--logger", 1786s "parser", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic parsing with very high verbosity 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing, with the code only option 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1786s # Check basic parsing, with the yaml output 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1786s # Check parsing with no output (used mostly for testing) 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1786s # Parsing with variants 1786s ( 1786s parse, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Check the benching commands 1786s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s # Check linting works in specifying rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check ignoring linting (multiprocess) 1786s # https://github.com/sqlfluff/sqlfluff/issues/5066 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--ignore", 1786s "linting", 1786s "-p", 1786s "2", 1786s "test/fixtures/linter/operator_errors.sql", 1786s "test/fixtures/linter/comma_errors.sql", 1786s ], 1786s ), 1786s # Check linting works in specifying multiple rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT02", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with both included and excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT01", 1786s "--exclude-rules", 1786s "LT01,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with just excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT01,LT03,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check that ignoring works (also checks that unicode files parse). 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT02,LT12,AL07", 1786s "--ignore", 1786s "parsing,lexing", 1786s "test/fixtures/linter/parse_lex_error.sql", 1786s ], 1786s ), 1786s # Check nofail works 1786s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1786s # Check config works (sets dialect to tsql) 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/.sqlfluff", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/pyproject.toml", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s # Check timing outputs doesn't raise exceptions 1786s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1786s # Check lint --help command doesn't raise exception. 1786s # NOTE: This tests the LazySequence in action. 1786s (lint, ["--help"]), 1786s ], 1786s ) 1786s def test__cli__command_lint_parse(command): 1786s """Check basic commands on a more complicated script.""" 1786s > invoke_assert_code(args=command) 1786s 1786s test/cli/commands_test.py:580: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0 1786s args = (, ['-n', '-v', 'test/fixtures/cli/passing_a.sql']) 1786s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_lint_parse[command5] ____________________ 1786s 1786s command = (, ['-n', '-vvvv', 'test/fixtures/cli/passing_a.sql']) 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s # Test basic linting 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Basic render 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/passing_b.sql", 1786s ], 1786s ), 1786s # Render with variants 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Original tests from test__cli__command_lint 1786s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s # Test basic linting with very high verbosity 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic linting with specific logger. 1786s # Also test short rule exclusion. 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvv", 1786s "--logger", 1786s "parser", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic parsing with very high verbosity 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing, with the code only option 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1786s # Check basic parsing, with the yaml output 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1786s # Check parsing with no output (used mostly for testing) 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1786s # Parsing with variants 1786s ( 1786s parse, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Check the benching commands 1786s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s # Check linting works in specifying rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check ignoring linting (multiprocess) 1786s # https://github.com/sqlfluff/sqlfluff/issues/5066 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--ignore", 1786s "linting", 1786s "-p", 1786s "2", 1786s "test/fixtures/linter/operator_errors.sql", 1786s "test/fixtures/linter/comma_errors.sql", 1786s ], 1786s ), 1786s # Check linting works in specifying multiple rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT02", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with both included and excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT01", 1786s "--exclude-rules", 1786s "LT01,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with just excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT01,LT03,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check that ignoring works (also checks that unicode files parse). 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT02,LT12,AL07", 1786s "--ignore", 1786s "parsing,lexing", 1786s "test/fixtures/linter/parse_lex_error.sql", 1786s ], 1786s ), 1786s # Check nofail works 1786s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1786s # Check config works (sets dialect to tsql) 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/.sqlfluff", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/pyproject.toml", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s # Check timing outputs doesn't raise exceptions 1786s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1786s # Check lint --help command doesn't raise exception. 1786s # NOTE: This tests the LazySequence in action. 1786s (lint, ["--help"]), 1786s ], 1786s ) 1786s def test__cli__command_lint_parse(command): 1786s """Check basic commands on a more complicated script.""" 1786s > invoke_assert_code(args=command) 1786s 1786s test/cli/commands_test.py:580: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0 1786s args = (, ['-n', '-vvvv', 'test/fixtures/cli/passing_a.sql']) 1786s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_lint_parse[command6] ____________________ 1786s 1786s command = (, ['-vvvv', 'test/fixtures/cli/passing_a.sql']) 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s # Test basic linting 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Basic render 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/passing_b.sql", 1786s ], 1786s ), 1786s # Render with variants 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Original tests from test__cli__command_lint 1786s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s # Test basic linting with very high verbosity 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic linting with specific logger. 1786s # Also test short rule exclusion. 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvv", 1786s "--logger", 1786s "parser", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic parsing with very high verbosity 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing, with the code only option 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1786s # Check basic parsing, with the yaml output 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1786s # Check parsing with no output (used mostly for testing) 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1786s # Parsing with variants 1786s ( 1786s parse, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Check the benching commands 1786s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s # Check linting works in specifying rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check ignoring linting (multiprocess) 1786s # https://github.com/sqlfluff/sqlfluff/issues/5066 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--ignore", 1786s "linting", 1786s "-p", 1786s "2", 1786s "test/fixtures/linter/operator_errors.sql", 1786s "test/fixtures/linter/comma_errors.sql", 1786s ], 1786s ), 1786s # Check linting works in specifying multiple rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT02", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with both included and excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT01", 1786s "--exclude-rules", 1786s "LT01,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with just excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT01,LT03,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check that ignoring works (also checks that unicode files parse). 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT02,LT12,AL07", 1786s "--ignore", 1786s "parsing,lexing", 1786s "test/fixtures/linter/parse_lex_error.sql", 1786s ], 1786s ), 1786s # Check nofail works 1786s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1786s # Check config works (sets dialect to tsql) 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/.sqlfluff", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/pyproject.toml", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s # Check timing outputs doesn't raise exceptions 1786s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1786s # Check lint --help command doesn't raise exception. 1786s # NOTE: This tests the LazySequence in action. 1786s (lint, ["--help"]), 1786s ], 1786s ) 1786s def test__cli__command_lint_parse(command): 1786s """Check basic commands on a more complicated script.""" 1786s > invoke_assert_code(args=command) 1786s 1786s test/cli/commands_test.py:580: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0 1786s args = (, ['-vvvv', 'test/fixtures/cli/passing_a.sql']) 1786s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_lint_parse[command7] ____________________ 1786s 1786s command = (, ['-n', 'test/fixtures/cli/passing_b.sql', '-vvvvvvvvvvv', '--exclude-rules', 'AM05']) 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s # Test basic linting 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Basic render 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/passing_b.sql", 1786s ], 1786s ), 1786s # Render with variants 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Original tests from test__cli__command_lint 1786s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s # Test basic linting with very high verbosity 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic linting with specific logger. 1786s # Also test short rule exclusion. 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvv", 1786s "--logger", 1786s "parser", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic parsing with very high verbosity 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing, with the code only option 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1786s # Check basic parsing, with the yaml output 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1786s # Check parsing with no output (used mostly for testing) 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1786s # Parsing with variants 1786s ( 1786s parse, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Check the benching commands 1786s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s # Check linting works in specifying rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check ignoring linting (multiprocess) 1786s # https://github.com/sqlfluff/sqlfluff/issues/5066 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--ignore", 1786s "linting", 1786s "-p", 1786s "2", 1786s "test/fixtures/linter/operator_errors.sql", 1786s "test/fixtures/linter/comma_errors.sql", 1786s ], 1786s ), 1786s # Check linting works in specifying multiple rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT02", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with both included and excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT01", 1786s "--exclude-rules", 1786s "LT01,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with just excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT01,LT03,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check that ignoring works (also checks that unicode files parse). 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT02,LT12,AL07", 1786s "--ignore", 1786s "parsing,lexing", 1786s "test/fixtures/linter/parse_lex_error.sql", 1786s ], 1786s ), 1786s # Check nofail works 1786s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1786s # Check config works (sets dialect to tsql) 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/.sqlfluff", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/pyproject.toml", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s # Check timing outputs doesn't raise exceptions 1786s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1786s # Check lint --help command doesn't raise exception. 1786s # NOTE: This tests the LazySequence in action. 1786s (lint, ["--help"]), 1786s ], 1786s ) 1786s def test__cli__command_lint_parse(command): 1786s """Check basic commands on a more complicated script.""" 1786s > invoke_assert_code(args=command) 1786s 1786s test/cli/commands_test.py:580: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0 1786s args = (, ['-n', 'test/fixtures/cli/passing_b.sql', '-vvvvvvvvvvv', '--exclude-rules', 'AM05']) 1786s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_lint_parse[command8] ____________________ 1786s 1786s command = (, ['-n', 'test/fixtures/cli/passing_b.sql', '-vvv', '--logger', 'parser', '-e', ...]) 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s # Test basic linting 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Basic render 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/passing_b.sql", 1786s ], 1786s ), 1786s # Render with variants 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Original tests from test__cli__command_lint 1786s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s # Test basic linting with very high verbosity 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic linting with specific logger. 1786s # Also test short rule exclusion. 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvv", 1786s "--logger", 1786s "parser", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic parsing with very high verbosity 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing, with the code only option 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1786s # Check basic parsing, with the yaml output 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1786s # Check parsing with no output (used mostly for testing) 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1786s # Parsing with variants 1786s ( 1786s parse, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Check the benching commands 1786s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1786s # Check linting works in specifying rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check ignoring linting (multiprocess) 1786s # https://github.com/sqlfluff/sqlfluff/issues/5066 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--ignore", 1786s "linting", 1786s "-p", 1786s "2", 1786s "test/fixtures/linter/operator_errors.sql", 1786s "test/fixtures/linter/comma_errors.sql", 1786s ], 1786s ), 1786s # Check linting works in specifying multiple rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT02", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with both included and excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--rules", 1786s "CP01,LT01", 1786s "--exclude-rules", 1786s "LT01,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check linting works with just excluded rules 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT01,LT03,AL07", 1786s "test/fixtures/linter/operator_errors.sql", 1786s ], 1786s ), 1786s # Check that ignoring works (also checks that unicode files parse). 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "--exclude-rules", 1786s "LT02,LT12,AL07", 1786s "--ignore", 1786s "parsing,lexing", 1786s "test/fixtures/linter/parse_lex_error.sql", 1786s ], 1786s ), 1786s # Check nofail works 1786s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1786s # Check config works (sets dialect to tsql) 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/.sqlfluff", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s ( 1786s lint, 1786s [ 1786s "--config", 1786s "test/fixtures/cli/extra_configs/pyproject.toml", 1786s "test/fixtures/cli/extra_config_tsql.sql", 1786s ], 1786s ), 1786s # Check timing outputs doesn't raise exceptions 1786s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1786s # Check lint --help command doesn't raise exception. 1786s # NOTE: This tests the LazySequence in action. 1786s (lint, ["--help"]), 1786s ], 1786s ) 1786s def test__cli__command_lint_parse(command): 1786s """Check basic commands on a more complicated script.""" 1786s > invoke_assert_code(args=command) 1786s 1786s test/cli/commands_test.py:580: 1786s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1786s 1786s ret_code = 0 1786s args = (, ['-n', 'test/fixtures/cli/passing_b.sql', '-vvv', '--logger', 'parser', '-e', ...]) 1786s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1786s raise_exceptions = True 1786s 1786s def invoke_assert_code( 1786s ret_code: int = 0, 1786s args: Optional[List[Any]] = None, 1786s kwargs: Optional[Dict[str, Any]] = None, 1786s cli_input: Optional[str] = None, 1786s mix_stderr: bool = True, 1786s assert_output_contains: str = "", 1786s raise_exceptions: bool = True, 1786s ) -> Result: 1786s """Invoke a command and check return code.""" 1786s args = args or [] 1786s kwargs = kwargs or {} 1786s if cli_input: 1786s kwargs["input"] = cli_input 1786s > runner = CliRunner(mix_stderr=mix_stderr) 1786s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1786s 1786s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1786s ___________________ test__cli__command_lint_parse[command9] ____________________ 1786s 1786s command = (, ['-n', 'test/fixtures/cli/passing_b.sql', '--exclude-rules', 'AM05']) 1786s 1786s @pytest.mark.parametrize( 1786s "command", 1786s [ 1786s # Test basic linting 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Basic render 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/passing_b.sql", 1786s ], 1786s ), 1786s # Render with variants 1786s ( 1786s render, 1786s [ 1786s "test/fixtures/cli/jinja_variants.sql", 1786s ], 1786s ), 1786s # Original tests from test__cli__command_lint 1786s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1786s # Test basic linting with very high verbosity 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic linting with specific logger. 1786s # Also test short rule exclusion. 1786s ( 1786s lint, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvv", 1786s "--logger", 1786s "parser", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "--exclude-rules", 1786s "AM05", 1786s ], 1786s ), 1786s # Test basic parsing with very high verbosity 1786s ( 1786s parse, 1786s [ 1786s "-n", 1786s "test/fixtures/cli/passing_b.sql", 1786s "-vvvvvvvvvvv", 1786s "-e", 1786s "AM05", 1786s ], 1786s ), 1786s # Check basic parsing, with the code only option 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1786s # Check basic parsing, with the yaml output 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1786s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1786s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['-n', 'test/fixtures/cli/passing_b.sql', '--exclude-rules', 'AM05']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command10] ___________________ 1787s 1787s command = (, ['-n', 'test/fixtures/cli/passing_b.sql', '-vvvvvvvvvvv', '-e', 'AM05']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['-n', 'test/fixtures/cli/passing_b.sql', '-vvvvvvvvvvv', '-e', 'AM05']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command11] ___________________ 1787s 1787s command = (, ['-n', 'test/fixtures/cli/passing_b.sql', '-c']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['-n', 'test/fixtures/cli/passing_b.sql', '-c']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command12] ___________________ 1787s 1787s command = (, ['-n', 'test/fixtures/cli/passing_b.sql', '-c', '--format', 'yaml']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['-n', 'test/fixtures/cli/passing_b.sql', '-c', '--format', 'yaml']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command13] ___________________ 1787s 1787s command = (, ['-n', 'test/fixtures/cli/passing_b.sql', '--format', 'yaml']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['-n', 'test/fixtures/cli/passing_b.sql', '--format', 'yaml']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command14] ___________________ 1787s 1787s command = (, ['-n', 'test/fixtures/cli/passing_b.sql', '--format', 'none']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['-n', 'test/fixtures/cli/passing_b.sql', '--format', 'none']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command15] ___________________ 1787s 1787s command = (, ['test/fixtures/cli/jinja_variants.sql']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0, args = (, ['test/fixtures/cli/jinja_variants.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command16] ___________________ 1787s 1787s command = (, ['-n', 'test/fixtures/cli/passing_timing.sql', '--bench']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['-n', 'test/fixtures/cli/passing_timing.sql', '--bench']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command17] ___________________ 1787s 1787s command = (, ['-n', 'test/fixtures/cli/passing_timing.sql', '--bench']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['-n', 'test/fixtures/cli/passing_timing.sql', '--bench']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command18] ___________________ 1787s 1787s command = (, ['-n', 'test/fixtures/cli/passing_timing.sql', '--bench']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['-n', 'test/fixtures/cli/passing_timing.sql', '--bench']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command19] ___________________ 1787s 1787s command = (, ['-n', '--rules', 'CP01', 'test/fixtures/linter/operator_errors.sql']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['-n', '--rules', 'CP01', 'test/fixtures/linter/operator_errors.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command20] ___________________ 1787s 1787s command = (, ['-n', '--ignore', 'linting', '-p', '2', 'test/fixtures/linter/operator_errors.sql', ...]) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['-n', '--ignore', 'linting', '-p', '2', 'test/fixtures/linter/operator_errors.sql', ...]) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command21] ___________________ 1787s 1787s command = (, ['-n', '--rules', 'CP01,LT02', 'test/fixtures/linter/operator_errors.sql']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['-n', '--rules', 'CP01,LT02', 'test/fixtures/linter/operator_errors.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command22] ___________________ 1787s 1787s command = (, ['-n', '--rules', 'CP01,LT01', '--exclude-rules', 'LT01,AL07', 'test/fixtures/linter/operator_errors.sql']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['-n', '--rules', 'CP01,LT01', '--exclude-rules', 'LT01,AL07', 'test/fixtures/linter/operator_errors.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command23] ___________________ 1787s 1787s command = (, ['-n', '--exclude-rules', 'LT01,LT03,AL07', 'test/fixtures/linter/operator_errors.sql']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['-n', '--exclude-rules', 'LT01,LT03,AL07', 'test/fixtures/linter/operator_errors.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command24] ___________________ 1787s 1787s command = (, ['-n', '--exclude-rules', 'LT02,LT12,AL07', '--ignore', 'parsing,lexing', 'test/fixtures/linter/parse_lex_error.sql']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['-n', '--exclude-rules', 'LT02,LT12,AL07', '--ignore', 'parsing,lexing', 'test/fixtures/linter/parse_lex_error.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command25] ___________________ 1787s 1787s command = (, ['--nofail', 'test/fixtures/linter/parse_lex_error.sql']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['--nofail', 'test/fixtures/linter/parse_lex_error.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command26] ___________________ 1787s 1787s command = (, ['--config', 'test/fixtures/cli/extra_configs/.sqlfluff', 'test/fixtures/cli/extra_config_tsql.sql']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['--config', 'test/fixtures/cli/extra_configs/.sqlfluff', 'test/fixtures/cli/extra_config_tsql.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command27] ___________________ 1787s 1787s command = (, ['--config', 'test/fixtures/cli/extra_configs/pyproject.toml', 'test/fixtures/cli/extra_config_tsql.sql']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['--config', 'test/fixtures/cli/extra_configs/pyproject.toml', 'test/fixtures/cli/extra_config_tsql.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command28] ___________________ 1787s 1787s command = (, ['test/fixtures/cli/passing_a.sql', '--persist-timing', 'test.csv']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['test/fixtures/cli/passing_a.sql', '--persist-timing', 'test.csv']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________ test__cli__command_lint_parse[command29] ___________________ 1787s 1787s command = (, ['--help']) 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s # Test basic linting 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Basic render 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/passing_b.sql", 1787s ], 1787s ), 1787s # Render with variants 1787s ( 1787s render, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Original tests from test__cli__command_lint 1787s (lint, ["-n", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-v", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-n", "-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s (lint, ["-vvvv", "test/fixtures/cli/passing_a.sql"]), 1787s # Test basic linting with very high verbosity 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic linting with specific logger. 1787s # Also test short rule exclusion. 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvv", 1787s "--logger", 1787s "parser", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "--exclude-rules", 1787s "AM05", 1787s ], 1787s ), 1787s # Test basic parsing with very high verbosity 1787s ( 1787s parse, 1787s [ 1787s "-n", 1787s "test/fixtures/cli/passing_b.sql", 1787s "-vvvvvvvvvvv", 1787s "-e", 1787s "AM05", 1787s ], 1787s ), 1787s # Check basic parsing, with the code only option 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c"]), 1787s # Check basic parsing, with the yaml output 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "-c", "--format", "yaml"]), 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "yaml"]), 1787s # Check parsing with no output (used mostly for testing) 1787s (parse, ["-n", "test/fixtures/cli/passing_b.sql", "--format", "none"]), 1787s # Parsing with variants 1787s ( 1787s parse, 1787s [ 1787s "test/fixtures/cli/jinja_variants.sql", 1787s ], 1787s ), 1787s # Check the benching commands 1787s (parse, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (lint, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s (fix, ["-n", "test/fixtures/cli/passing_timing.sql", "--bench"]), 1787s # Check linting works in specifying rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check ignoring linting (multiprocess) 1787s # https://github.com/sqlfluff/sqlfluff/issues/5066 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--ignore", 1787s "linting", 1787s "-p", 1787s "2", 1787s "test/fixtures/linter/operator_errors.sql", 1787s "test/fixtures/linter/comma_errors.sql", 1787s ], 1787s ), 1787s # Check linting works in specifying multiple rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT02", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with both included and excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--rules", 1787s "CP01,LT01", 1787s "--exclude-rules", 1787s "LT01,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check linting works with just excluded rules 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT01,LT03,AL07", 1787s "test/fixtures/linter/operator_errors.sql", 1787s ], 1787s ), 1787s # Check that ignoring works (also checks that unicode files parse). 1787s ( 1787s lint, 1787s [ 1787s "-n", 1787s "--exclude-rules", 1787s "LT02,LT12,AL07", 1787s "--ignore", 1787s "parsing,lexing", 1787s "test/fixtures/linter/parse_lex_error.sql", 1787s ], 1787s ), 1787s # Check nofail works 1787s (lint, ["--nofail", "test/fixtures/linter/parse_lex_error.sql"]), 1787s # Check config works (sets dialect to tsql) 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/.sqlfluff", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s ( 1787s lint, 1787s [ 1787s "--config", 1787s "test/fixtures/cli/extra_configs/pyproject.toml", 1787s "test/fixtures/cli/extra_config_tsql.sql", 1787s ], 1787s ), 1787s # Check timing outputs doesn't raise exceptions 1787s (lint, ["test/fixtures/cli/passing_a.sql", "--persist-timing", "test.csv"]), 1787s # Check lint --help command doesn't raise exception. 1787s # NOTE: This tests the LazySequence in action. 1787s (lint, ["--help"]), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse(command): 1787s """Check basic commands on a more complicated script.""" 1787s > invoke_assert_code(args=command) 1787s 1787s test/cli/commands_test.py:580: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0, args = (, ['--help']), kwargs = {}, cli_input = None 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ____________ test__cli__command_lint_parse_with_retcode[command0-1] ____________ 1787s 1787s command = (, ['--rules', 'LT01', 'test/fixtures/cli/fail_many.sql', '-vvvvvvv']) 1787s ret_code = 1 1787s 1787s @pytest.mark.parametrize( 1787s "command, ret_code", 1787s [ 1787s # Check the script doesn't raise an unexpected exception with badly formed 1787s # files. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "test/fixtures/cli/fail_many.sql", 1787s "-vvvvvvv", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix with a suffixs 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix without specifying rules 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Format 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format with --persist-timing 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s "--persist-timing", 1787s "test.csv", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format (specifying rules) 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Template syntax error in macro file 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/unknown_jinja_tag/test.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test overriding library path when it doesn't cause an issue 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/passing_a.sql", "--library-path", "none"], 1787s ), 1787s 0, 1787s ), 1787s # Test overriding library path when it DOES cause an issue 1787s # (because macros won't be found). 1787s ( 1787s ( 1787s # Render because that's the step where the issue will 1787s # occur. 1787s render, 1787s [ 1787s "test/fixtures/templater/jinja_r_library_in_macro/jinja.sql", 1787s "--library-path", 1787s "none", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test render fail 1787s ( 1787s ( 1787s render, 1787s ["test/fixtures/cli/fail_many.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test a longer lint fail with --bench 1787s # This tests the threshold rules clause 1787s ( 1787s ( 1787s lint, 1787s [ 1787s "test/fixtures/linter/autofix/bigquery/004_templating/before.sql", 1787s "--bench", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test that setting --quiet with --verbose raises an error. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--quiet", 1787s "--verbose", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Test machine format parse command with an unparsable file. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/linter/parse_lex_error.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s # Test machine format parse command with a fatal templating error. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/cli/jinja_fatal_fail.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse_with_retcode(command, ret_code): 1787s """Check commands expecting a non-zero ret code.""" 1787s > invoke_assert_code(ret_code=ret_code, args=command) 1787s 1787s test/cli/commands_test.py:749: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = (, ['--rules', 'LT01', 'test/fixtures/cli/fail_many.sql', '-vvvvvvv']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ____________ test__cli__command_lint_parse_with_retcode[command1-1] ____________ 1787s 1787s command = (, ['--rules', 'LT01', '--fixed-suffix', '_fix', 'test/fixtures/cli/fail_many.sql']) 1787s ret_code = 1 1787s 1787s @pytest.mark.parametrize( 1787s "command, ret_code", 1787s [ 1787s # Check the script doesn't raise an unexpected exception with badly formed 1787s # files. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "test/fixtures/cli/fail_many.sql", 1787s "-vvvvvvv", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix with a suffixs 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix without specifying rules 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Format 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format with --persist-timing 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s "--persist-timing", 1787s "test.csv", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format (specifying rules) 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Template syntax error in macro file 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/unknown_jinja_tag/test.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test overriding library path when it doesn't cause an issue 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/passing_a.sql", "--library-path", "none"], 1787s ), 1787s 0, 1787s ), 1787s # Test overriding library path when it DOES cause an issue 1787s # (because macros won't be found). 1787s ( 1787s ( 1787s # Render because that's the step where the issue will 1787s # occur. 1787s render, 1787s [ 1787s "test/fixtures/templater/jinja_r_library_in_macro/jinja.sql", 1787s "--library-path", 1787s "none", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test render fail 1787s ( 1787s ( 1787s render, 1787s ["test/fixtures/cli/fail_many.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test a longer lint fail with --bench 1787s # This tests the threshold rules clause 1787s ( 1787s ( 1787s lint, 1787s [ 1787s "test/fixtures/linter/autofix/bigquery/004_templating/before.sql", 1787s "--bench", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test that setting --quiet with --verbose raises an error. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--quiet", 1787s "--verbose", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Test machine format parse command with an unparsable file. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/linter/parse_lex_error.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s # Test machine format parse command with a fatal templating error. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/cli/jinja_fatal_fail.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse_with_retcode(command, ret_code): 1787s """Check commands expecting a non-zero ret code.""" 1787s > invoke_assert_code(ret_code=ret_code, args=command) 1787s 1787s test/cli/commands_test.py:749: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = (, ['--rules', 'LT01', '--fixed-suffix', '_fix', 'test/fixtures/cli/fail_many.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ____________ test__cli__command_lint_parse_with_retcode[command2-1] ____________ 1787s 1787s command = (, ['--fixed-suffix', '_fix', 'test/fixtures/cli/fail_many.sql']) 1787s ret_code = 1 1787s 1787s @pytest.mark.parametrize( 1787s "command, ret_code", 1787s [ 1787s # Check the script doesn't raise an unexpected exception with badly formed 1787s # files. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "test/fixtures/cli/fail_many.sql", 1787s "-vvvvvvv", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix with a suffixs 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix without specifying rules 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Format 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format with --persist-timing 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s "--persist-timing", 1787s "test.csv", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format (specifying rules) 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Template syntax error in macro file 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/unknown_jinja_tag/test.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test overriding library path when it doesn't cause an issue 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/passing_a.sql", "--library-path", "none"], 1787s ), 1787s 0, 1787s ), 1787s # Test overriding library path when it DOES cause an issue 1787s # (because macros won't be found). 1787s ( 1787s ( 1787s # Render because that's the step where the issue will 1787s # occur. 1787s render, 1787s [ 1787s "test/fixtures/templater/jinja_r_library_in_macro/jinja.sql", 1787s "--library-path", 1787s "none", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test render fail 1787s ( 1787s ( 1787s render, 1787s ["test/fixtures/cli/fail_many.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test a longer lint fail with --bench 1787s # This tests the threshold rules clause 1787s ( 1787s ( 1787s lint, 1787s [ 1787s "test/fixtures/linter/autofix/bigquery/004_templating/before.sql", 1787s "--bench", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test that setting --quiet with --verbose raises an error. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--quiet", 1787s "--verbose", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Test machine format parse command with an unparsable file. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/linter/parse_lex_error.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s # Test machine format parse command with a fatal templating error. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/cli/jinja_fatal_fail.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse_with_retcode(command, ret_code): 1787s """Check commands expecting a non-zero ret code.""" 1787s > invoke_assert_code(ret_code=ret_code, args=command) 1787s 1787s test/cli/commands_test.py:749: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = (, ['--fixed-suffix', '_fix', 'test/fixtures/cli/fail_many.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ____________ test__cli__command_lint_parse_with_retcode[command3-0] ____________ 1787s 1787s command = (, ['--fixed-suffix', '_fix', 'test/fixtures/linter/whitespace_errors.sql']) 1787s ret_code = 0 1787s 1787s @pytest.mark.parametrize( 1787s "command, ret_code", 1787s [ 1787s # Check the script doesn't raise an unexpected exception with badly formed 1787s # files. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "test/fixtures/cli/fail_many.sql", 1787s "-vvvvvvv", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix with a suffixs 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix without specifying rules 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Format 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format with --persist-timing 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s "--persist-timing", 1787s "test.csv", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format (specifying rules) 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Template syntax error in macro file 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/unknown_jinja_tag/test.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test overriding library path when it doesn't cause an issue 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/passing_a.sql", "--library-path", "none"], 1787s ), 1787s 0, 1787s ), 1787s # Test overriding library path when it DOES cause an issue 1787s # (because macros won't be found). 1787s ( 1787s ( 1787s # Render because that's the step where the issue will 1787s # occur. 1787s render, 1787s [ 1787s "test/fixtures/templater/jinja_r_library_in_macro/jinja.sql", 1787s "--library-path", 1787s "none", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test render fail 1787s ( 1787s ( 1787s render, 1787s ["test/fixtures/cli/fail_many.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test a longer lint fail with --bench 1787s # This tests the threshold rules clause 1787s ( 1787s ( 1787s lint, 1787s [ 1787s "test/fixtures/linter/autofix/bigquery/004_templating/before.sql", 1787s "--bench", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test that setting --quiet with --verbose raises an error. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--quiet", 1787s "--verbose", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Test machine format parse command with an unparsable file. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/linter/parse_lex_error.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s # Test machine format parse command with a fatal templating error. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/cli/jinja_fatal_fail.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse_with_retcode(command, ret_code): 1787s """Check commands expecting a non-zero ret code.""" 1787s > invoke_assert_code(ret_code=ret_code, args=command) 1787s 1787s test/cli/commands_test.py:749: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['--fixed-suffix', '_fix', 'test/fixtures/linter/whitespace_errors.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ____________ test__cli__command_lint_parse_with_retcode[command4-0] ____________ 1787s 1787s command = (, ['--fixed-suffix', '_fix', 'test/fixtures/linter/whitespace_errors.sql', '--persist-timing', 'test.csv']) 1787s ret_code = 0 1787s 1787s @pytest.mark.parametrize( 1787s "command, ret_code", 1787s [ 1787s # Check the script doesn't raise an unexpected exception with badly formed 1787s # files. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "test/fixtures/cli/fail_many.sql", 1787s "-vvvvvvv", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix with a suffixs 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix without specifying rules 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Format 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format with --persist-timing 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s "--persist-timing", 1787s "test.csv", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format (specifying rules) 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Template syntax error in macro file 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/unknown_jinja_tag/test.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test overriding library path when it doesn't cause an issue 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/passing_a.sql", "--library-path", "none"], 1787s ), 1787s 0, 1787s ), 1787s # Test overriding library path when it DOES cause an issue 1787s # (because macros won't be found). 1787s ( 1787s ( 1787s # Render because that's the step where the issue will 1787s # occur. 1787s render, 1787s [ 1787s "test/fixtures/templater/jinja_r_library_in_macro/jinja.sql", 1787s "--library-path", 1787s "none", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test render fail 1787s ( 1787s ( 1787s render, 1787s ["test/fixtures/cli/fail_many.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test a longer lint fail with --bench 1787s # This tests the threshold rules clause 1787s ( 1787s ( 1787s lint, 1787s [ 1787s "test/fixtures/linter/autofix/bigquery/004_templating/before.sql", 1787s "--bench", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test that setting --quiet with --verbose raises an error. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--quiet", 1787s "--verbose", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Test machine format parse command with an unparsable file. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/linter/parse_lex_error.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s # Test machine format parse command with a fatal templating error. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/cli/jinja_fatal_fail.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse_with_retcode(command, ret_code): 1787s """Check commands expecting a non-zero ret code.""" 1787s > invoke_assert_code(ret_code=ret_code, args=command) 1787s 1787s test/cli/commands_test.py:749: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['--fixed-suffix', '_fix', 'test/fixtures/linter/whitespace_errors.sql', '--persist-timing', 'test.csv']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ____________ test__cli__command_lint_parse_with_retcode[command5-2] ____________ 1787s 1787s command = (, ['--rules', 'LT01', '--fixed-suffix', '_fix', 'test/fixtures/linter/whitespace_errors.sql']) 1787s ret_code = 2 1787s 1787s @pytest.mark.parametrize( 1787s "command, ret_code", 1787s [ 1787s # Check the script doesn't raise an unexpected exception with badly formed 1787s # files. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "test/fixtures/cli/fail_many.sql", 1787s "-vvvvvvv", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix with a suffixs 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix without specifying rules 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Format 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format with --persist-timing 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s "--persist-timing", 1787s "test.csv", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format (specifying rules) 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Template syntax error in macro file 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/unknown_jinja_tag/test.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test overriding library path when it doesn't cause an issue 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/passing_a.sql", "--library-path", "none"], 1787s ), 1787s 0, 1787s ), 1787s # Test overriding library path when it DOES cause an issue 1787s # (because macros won't be found). 1787s ( 1787s ( 1787s # Render because that's the step where the issue will 1787s # occur. 1787s render, 1787s [ 1787s "test/fixtures/templater/jinja_r_library_in_macro/jinja.sql", 1787s "--library-path", 1787s "none", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test render fail 1787s ( 1787s ( 1787s render, 1787s ["test/fixtures/cli/fail_many.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test a longer lint fail with --bench 1787s # This tests the threshold rules clause 1787s ( 1787s ( 1787s lint, 1787s [ 1787s "test/fixtures/linter/autofix/bigquery/004_templating/before.sql", 1787s "--bench", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test that setting --quiet with --verbose raises an error. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--quiet", 1787s "--verbose", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Test machine format parse command with an unparsable file. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/linter/parse_lex_error.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s # Test machine format parse command with a fatal templating error. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/cli/jinja_fatal_fail.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse_with_retcode(command, ret_code): 1787s """Check commands expecting a non-zero ret code.""" 1787s > invoke_assert_code(ret_code=ret_code, args=command) 1787s 1787s test/cli/commands_test.py:749: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 2 1787s args = (, ['--rules', 'LT01', '--fixed-suffix', '_fix', 'test/fixtures/linter/whitespace_errors.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ____________ test__cli__command_lint_parse_with_retcode[command6-1] ____________ 1787s 1787s command = (, ['test/fixtures/cli/unknown_jinja_tag/test.sql']) 1787s ret_code = 1 1787s 1787s @pytest.mark.parametrize( 1787s "command, ret_code", 1787s [ 1787s # Check the script doesn't raise an unexpected exception with badly formed 1787s # files. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "test/fixtures/cli/fail_many.sql", 1787s "-vvvvvvv", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix with a suffixs 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix without specifying rules 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Format 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format with --persist-timing 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s "--persist-timing", 1787s "test.csv", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format (specifying rules) 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Template syntax error in macro file 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/unknown_jinja_tag/test.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test overriding library path when it doesn't cause an issue 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/passing_a.sql", "--library-path", "none"], 1787s ), 1787s 0, 1787s ), 1787s # Test overriding library path when it DOES cause an issue 1787s # (because macros won't be found). 1787s ( 1787s ( 1787s # Render because that's the step where the issue will 1787s # occur. 1787s render, 1787s [ 1787s "test/fixtures/templater/jinja_r_library_in_macro/jinja.sql", 1787s "--library-path", 1787s "none", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test render fail 1787s ( 1787s ( 1787s render, 1787s ["test/fixtures/cli/fail_many.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test a longer lint fail with --bench 1787s # This tests the threshold rules clause 1787s ( 1787s ( 1787s lint, 1787s [ 1787s "test/fixtures/linter/autofix/bigquery/004_templating/before.sql", 1787s "--bench", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test that setting --quiet with --verbose raises an error. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--quiet", 1787s "--verbose", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Test machine format parse command with an unparsable file. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/linter/parse_lex_error.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s # Test machine format parse command with a fatal templating error. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/cli/jinja_fatal_fail.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse_with_retcode(command, ret_code): 1787s """Check commands expecting a non-zero ret code.""" 1787s > invoke_assert_code(ret_code=ret_code, args=command) 1787s 1787s test/cli/commands_test.py:749: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = (, ['test/fixtures/cli/unknown_jinja_tag/test.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ____________ test__cli__command_lint_parse_with_retcode[command7-0] ____________ 1787s 1787s command = (, ['test/fixtures/cli/passing_a.sql', '--library-path', 'none']) 1787s ret_code = 0 1787s 1787s @pytest.mark.parametrize( 1787s "command, ret_code", 1787s [ 1787s # Check the script doesn't raise an unexpected exception with badly formed 1787s # files. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "test/fixtures/cli/fail_many.sql", 1787s "-vvvvvvv", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix with a suffixs 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix without specifying rules 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Format 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format with --persist-timing 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s "--persist-timing", 1787s "test.csv", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format (specifying rules) 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Template syntax error in macro file 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/unknown_jinja_tag/test.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test overriding library path when it doesn't cause an issue 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/passing_a.sql", "--library-path", "none"], 1787s ), 1787s 0, 1787s ), 1787s # Test overriding library path when it DOES cause an issue 1787s # (because macros won't be found). 1787s ( 1787s ( 1787s # Render because that's the step where the issue will 1787s # occur. 1787s render, 1787s [ 1787s "test/fixtures/templater/jinja_r_library_in_macro/jinja.sql", 1787s "--library-path", 1787s "none", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test render fail 1787s ( 1787s ( 1787s render, 1787s ["test/fixtures/cli/fail_many.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test a longer lint fail with --bench 1787s # This tests the threshold rules clause 1787s ( 1787s ( 1787s lint, 1787s [ 1787s "test/fixtures/linter/autofix/bigquery/004_templating/before.sql", 1787s "--bench", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test that setting --quiet with --verbose raises an error. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--quiet", 1787s "--verbose", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Test machine format parse command with an unparsable file. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/linter/parse_lex_error.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s # Test machine format parse command with a fatal templating error. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/cli/jinja_fatal_fail.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse_with_retcode(command, ret_code): 1787s """Check commands expecting a non-zero ret code.""" 1787s > invoke_assert_code(ret_code=ret_code, args=command) 1787s 1787s test/cli/commands_test.py:749: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = (, ['test/fixtures/cli/passing_a.sql', '--library-path', 'none']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ____________ test__cli__command_lint_parse_with_retcode[command8-1] ____________ 1787s 1787s command = (, ['test/fixtures/templater/jinja_r_library_in_macro/jinja.sql', '--library-path', 'none']) 1787s ret_code = 1 1787s 1787s @pytest.mark.parametrize( 1787s "command, ret_code", 1787s [ 1787s # Check the script doesn't raise an unexpected exception with badly formed 1787s # files. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "test/fixtures/cli/fail_many.sql", 1787s "-vvvvvvv", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix with a suffixs 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix without specifying rules 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Format 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format with --persist-timing 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s "--persist-timing", 1787s "test.csv", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format (specifying rules) 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Template syntax error in macro file 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/unknown_jinja_tag/test.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test overriding library path when it doesn't cause an issue 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/passing_a.sql", "--library-path", "none"], 1787s ), 1787s 0, 1787s ), 1787s # Test overriding library path when it DOES cause an issue 1787s # (because macros won't be found). 1787s ( 1787s ( 1787s # Render because that's the step where the issue will 1787s # occur. 1787s render, 1787s [ 1787s "test/fixtures/templater/jinja_r_library_in_macro/jinja.sql", 1787s "--library-path", 1787s "none", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test render fail 1787s ( 1787s ( 1787s render, 1787s ["test/fixtures/cli/fail_many.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test a longer lint fail with --bench 1787s # This tests the threshold rules clause 1787s ( 1787s ( 1787s lint, 1787s [ 1787s "test/fixtures/linter/autofix/bigquery/004_templating/before.sql", 1787s "--bench", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test that setting --quiet with --verbose raises an error. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--quiet", 1787s "--verbose", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Test machine format parse command with an unparsable file. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/linter/parse_lex_error.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s # Test machine format parse command with a fatal templating error. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/cli/jinja_fatal_fail.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse_with_retcode(command, ret_code): 1787s """Check commands expecting a non-zero ret code.""" 1787s > invoke_assert_code(ret_code=ret_code, args=command) 1787s 1787s test/cli/commands_test.py:749: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = (, ['test/fixtures/templater/jinja_r_library_in_macro/jinja.sql', '--library-path', 'none']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ____________ test__cli__command_lint_parse_with_retcode[command9-1] ____________ 1787s 1787s command = (, ['test/fixtures/cli/fail_many.sql']), ret_code = 1 1787s 1787s @pytest.mark.parametrize( 1787s "command, ret_code", 1787s [ 1787s # Check the script doesn't raise an unexpected exception with badly formed 1787s # files. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "test/fixtures/cli/fail_many.sql", 1787s "-vvvvvvv", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix with a suffixs 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix without specifying rules 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Format 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format with --persist-timing 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s "--persist-timing", 1787s "test.csv", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format (specifying rules) 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Template syntax error in macro file 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/unknown_jinja_tag/test.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test overriding library path when it doesn't cause an issue 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/passing_a.sql", "--library-path", "none"], 1787s ), 1787s 0, 1787s ), 1787s # Test overriding library path when it DOES cause an issue 1787s # (because macros won't be found). 1787s ( 1787s ( 1787s # Render because that's the step where the issue will 1787s # occur. 1787s render, 1787s [ 1787s "test/fixtures/templater/jinja_r_library_in_macro/jinja.sql", 1787s "--library-path", 1787s "none", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test render fail 1787s ( 1787s ( 1787s render, 1787s ["test/fixtures/cli/fail_many.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test a longer lint fail with --bench 1787s # This tests the threshold rules clause 1787s ( 1787s ( 1787s lint, 1787s [ 1787s "test/fixtures/linter/autofix/bigquery/004_templating/before.sql", 1787s "--bench", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test that setting --quiet with --verbose raises an error. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--quiet", 1787s "--verbose", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Test machine format parse command with an unparsable file. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/linter/parse_lex_error.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s # Test machine format parse command with a fatal templating error. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/cli/jinja_fatal_fail.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse_with_retcode(command, ret_code): 1787s """Check commands expecting a non-zero ret code.""" 1787s > invoke_assert_code(ret_code=ret_code, args=command) 1787s 1787s test/cli/commands_test.py:749: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1, args = (, ['test/fixtures/cli/fail_many.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________ test__cli__command_lint_parse_with_retcode[command10-1] ____________ 1787s 1787s command = (, ['test/fixtures/linter/autofix/bigquery/004_templating/before.sql', '--bench']) 1787s ret_code = 1 1787s 1787s @pytest.mark.parametrize( 1787s "command, ret_code", 1787s [ 1787s # Check the script doesn't raise an unexpected exception with badly formed 1787s # files. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "test/fixtures/cli/fail_many.sql", 1787s "-vvvvvvv", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix with a suffixs 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix without specifying rules 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Format 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format with --persist-timing 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s "--persist-timing", 1787s "test.csv", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format (specifying rules) 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Template syntax error in macro file 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/unknown_jinja_tag/test.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test overriding library path when it doesn't cause an issue 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/passing_a.sql", "--library-path", "none"], 1787s ), 1787s 0, 1787s ), 1787s # Test overriding library path when it DOES cause an issue 1787s # (because macros won't be found). 1787s ( 1787s ( 1787s # Render because that's the step where the issue will 1787s # occur. 1787s render, 1787s [ 1787s "test/fixtures/templater/jinja_r_library_in_macro/jinja.sql", 1787s "--library-path", 1787s "none", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test render fail 1787s ( 1787s ( 1787s render, 1787s ["test/fixtures/cli/fail_many.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test a longer lint fail with --bench 1787s # This tests the threshold rules clause 1787s ( 1787s ( 1787s lint, 1787s [ 1787s "test/fixtures/linter/autofix/bigquery/004_templating/before.sql", 1787s "--bench", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test that setting --quiet with --verbose raises an error. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--quiet", 1787s "--verbose", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Test machine format parse command with an unparsable file. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/linter/parse_lex_error.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s # Test machine format parse command with a fatal templating error. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/cli/jinja_fatal_fail.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse_with_retcode(command, ret_code): 1787s """Check commands expecting a non-zero ret code.""" 1787s > invoke_assert_code(ret_code=ret_code, args=command) 1787s 1787s test/cli/commands_test.py:749: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = (, ['test/fixtures/linter/autofix/bigquery/004_templating/before.sql', '--bench']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________ test__cli__command_lint_parse_with_retcode[command11-2] ____________ 1787s 1787s command = (, ['--quiet', '--verbose', 'test/fixtures/cli/fail_many.sql']) 1787s ret_code = 2 1787s 1787s @pytest.mark.parametrize( 1787s "command, ret_code", 1787s [ 1787s # Check the script doesn't raise an unexpected exception with badly formed 1787s # files. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "test/fixtures/cli/fail_many.sql", 1787s "-vvvvvvv", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix with a suffixs 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix without specifying rules 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Format 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format with --persist-timing 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s "--persist-timing", 1787s "test.csv", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format (specifying rules) 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Template syntax error in macro file 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/unknown_jinja_tag/test.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test overriding library path when it doesn't cause an issue 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/passing_a.sql", "--library-path", "none"], 1787s ), 1787s 0, 1787s ), 1787s # Test overriding library path when it DOES cause an issue 1787s # (because macros won't be found). 1787s ( 1787s ( 1787s # Render because that's the step where the issue will 1787s # occur. 1787s render, 1787s [ 1787s "test/fixtures/templater/jinja_r_library_in_macro/jinja.sql", 1787s "--library-path", 1787s "none", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test render fail 1787s ( 1787s ( 1787s render, 1787s ["test/fixtures/cli/fail_many.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test a longer lint fail with --bench 1787s # This tests the threshold rules clause 1787s ( 1787s ( 1787s lint, 1787s [ 1787s "test/fixtures/linter/autofix/bigquery/004_templating/before.sql", 1787s "--bench", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test that setting --quiet with --verbose raises an error. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--quiet", 1787s "--verbose", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Test machine format parse command with an unparsable file. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/linter/parse_lex_error.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s # Test machine format parse command with a fatal templating error. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/cli/jinja_fatal_fail.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse_with_retcode(command, ret_code): 1787s """Check commands expecting a non-zero ret code.""" 1787s > invoke_assert_code(ret_code=ret_code, args=command) 1787s 1787s test/cli/commands_test.py:749: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 2 1787s args = (, ['--quiet', '--verbose', 'test/fixtures/cli/fail_many.sql']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________ test__cli__command_lint_parse_with_retcode[command12-1] ____________ 1787s 1787s command = (, ['test/fixtures/linter/parse_lex_error.sql', '-f', 'yaml']) 1787s ret_code = 1 1787s 1787s @pytest.mark.parametrize( 1787s "command, ret_code", 1787s [ 1787s # Check the script doesn't raise an unexpected exception with badly formed 1787s # files. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "test/fixtures/cli/fail_many.sql", 1787s "-vvvvvvv", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix with a suffixs 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix without specifying rules 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Format 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format with --persist-timing 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s "--persist-timing", 1787s "test.csv", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format (specifying rules) 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Template syntax error in macro file 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/unknown_jinja_tag/test.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test overriding library path when it doesn't cause an issue 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/passing_a.sql", "--library-path", "none"], 1787s ), 1787s 0, 1787s ), 1787s # Test overriding library path when it DOES cause an issue 1787s # (because macros won't be found). 1787s ( 1787s ( 1787s # Render because that's the step where the issue will 1787s # occur. 1787s render, 1787s [ 1787s "test/fixtures/templater/jinja_r_library_in_macro/jinja.sql", 1787s "--library-path", 1787s "none", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test render fail 1787s ( 1787s ( 1787s render, 1787s ["test/fixtures/cli/fail_many.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test a longer lint fail with --bench 1787s # This tests the threshold rules clause 1787s ( 1787s ( 1787s lint, 1787s [ 1787s "test/fixtures/linter/autofix/bigquery/004_templating/before.sql", 1787s "--bench", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test that setting --quiet with --verbose raises an error. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--quiet", 1787s "--verbose", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Test machine format parse command with an unparsable file. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/linter/parse_lex_error.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s # Test machine format parse command with a fatal templating error. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/cli/jinja_fatal_fail.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse_with_retcode(command, ret_code): 1787s """Check commands expecting a non-zero ret code.""" 1787s > invoke_assert_code(ret_code=ret_code, args=command) 1787s 1787s test/cli/commands_test.py:749: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = (, ['test/fixtures/linter/parse_lex_error.sql', '-f', 'yaml']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________ test__cli__command_lint_parse_with_retcode[command13-1] ____________ 1787s 1787s command = (, ['test/fixtures/cli/jinja_fatal_fail.sql', '-f', 'yaml']) 1787s ret_code = 1 1787s 1787s @pytest.mark.parametrize( 1787s "command, ret_code", 1787s [ 1787s # Check the script doesn't raise an unexpected exception with badly formed 1787s # files. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "test/fixtures/cli/fail_many.sql", 1787s "-vvvvvvv", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix with a suffixs 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Fix without specifying rules 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Format 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format with --persist-timing 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s "--persist-timing", 1787s "test.csv", 1787s ], 1787s ), 1787s 0, 1787s ), 1787s # Format (specifying rules) 1787s ( 1787s ( 1787s cli_format, 1787s [ 1787s "--rules", 1787s "LT01", 1787s "--fixed-suffix", 1787s "_fix", 1787s "test/fixtures/linter/whitespace_errors.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Template syntax error in macro file 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/unknown_jinja_tag/test.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test overriding library path when it doesn't cause an issue 1787s ( 1787s ( 1787s lint, 1787s ["test/fixtures/cli/passing_a.sql", "--library-path", "none"], 1787s ), 1787s 0, 1787s ), 1787s # Test overriding library path when it DOES cause an issue 1787s # (because macros won't be found). 1787s ( 1787s ( 1787s # Render because that's the step where the issue will 1787s # occur. 1787s render, 1787s [ 1787s "test/fixtures/templater/jinja_r_library_in_macro/jinja.sql", 1787s "--library-path", 1787s "none", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test render fail 1787s ( 1787s ( 1787s render, 1787s ["test/fixtures/cli/fail_many.sql"], 1787s ), 1787s 1, 1787s ), 1787s # Test a longer lint fail with --bench 1787s # This tests the threshold rules clause 1787s ( 1787s ( 1787s lint, 1787s [ 1787s "test/fixtures/linter/autofix/bigquery/004_templating/before.sql", 1787s "--bench", 1787s ], 1787s ), 1787s 1, 1787s ), 1787s # Test that setting --quiet with --verbose raises an error. 1787s ( 1787s ( 1787s fix, 1787s [ 1787s "--quiet", 1787s "--verbose", 1787s "test/fixtures/cli/fail_many.sql", 1787s ], 1787s ), 1787s 2, 1787s ), 1787s # Test machine format parse command with an unparsable file. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/linter/parse_lex_error.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s # Test machine format parse command with a fatal templating error. 1787s ( 1787s ( 1787s parse, 1787s ["test/fixtures/cli/jinja_fatal_fail.sql", "-f", "yaml"], 1787s ), 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_parse_with_retcode(command, ret_code): 1787s """Check commands expecting a non-zero ret code.""" 1787s > invoke_assert_code(ret_code=ret_code, args=command) 1787s 1787s test/cli/commands_test.py:749: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = (, ['test/fixtures/cli/jinja_fatal_fail.sql', '-f', 'yaml']) 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________________________ test__cli__command_rules ___________________________ 1787s 1787s def test__cli__command_rules(): 1787s """Check rules command for exceptions.""" 1787s > invoke_assert_code(args=[rules]) 1787s 1787s test/cli/commands_test.py:893: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0, args = [], kwargs = {}, cli_input = None 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _________________________ test__cli__command_dialects __________________________ 1787s 1787s def test__cli__command_dialects(): 1787s """Check dialects command for exceptions.""" 1787s > invoke_assert_code(args=[dialects]) 1787s 1787s test/cli/commands_test.py:898: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0, args = [], kwargs = {}, cli_input = None 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s __ test__cli__command__fix[LT01-test/fixtures/linter/indentation_errors.sql0] __ 1787s 1787s rule = 'LT01', fname = 'test/fixtures/linter/indentation_errors.sql' 1787s 1787s @pytest.mark.parametrize( 1787s "rule,fname", 1787s [ 1787s ("LT01", "test/fixtures/linter/indentation_errors.sql"), 1787s ("LT01", "test/fixtures/linter/whitespace_errors.sql"), 1787s ("LT01", "test/fixtures/linter/indentation_errors.sql"), 1787s # Really stretching the ability of the fixer to re-indent a file 1787s ("LT02", "test/fixtures/linter/indentation_error_hard.sql"), 1787s ], 1787s ) 1787s def test__cli__command__fix(rule, fname): 1787s """Test the round trip of detecting, fixing and then not detecting the rule.""" 1787s with open(fname) as test_file: 1787s > generic_roundtrip_test(test_file, rule) 1787s 1787s test/cli/commands_test.py:972: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s test/cli/commands_test.py:928: in generic_roundtrip_test 1787s invoke_assert_code( 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ['--dialect=ansi', '--rules', 'LT01', '/tmp/tmp6nhn9z19/testing.sql']] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___ test__cli__command__fix[LT01-test/fixtures/linter/whitespace_errors.sql] ___ 1787s 1787s rule = 'LT01', fname = 'test/fixtures/linter/whitespace_errors.sql' 1787s 1787s @pytest.mark.parametrize( 1787s "rule,fname", 1787s [ 1787s ("LT01", "test/fixtures/linter/indentation_errors.sql"), 1787s ("LT01", "test/fixtures/linter/whitespace_errors.sql"), 1787s ("LT01", "test/fixtures/linter/indentation_errors.sql"), 1787s # Really stretching the ability of the fixer to re-indent a file 1787s ("LT02", "test/fixtures/linter/indentation_error_hard.sql"), 1787s ], 1787s ) 1787s def test__cli__command__fix(rule, fname): 1787s """Test the round trip of detecting, fixing and then not detecting the rule.""" 1787s with open(fname) as test_file: 1787s > generic_roundtrip_test(test_file, rule) 1787s 1787s test/cli/commands_test.py:972: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s test/cli/commands_test.py:928: in generic_roundtrip_test 1787s invoke_assert_code( 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ['--dialect=ansi', '--rules', 'LT01', '/tmp/tmpfdsn13tu/testing.sql']] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s __ test__cli__command__fix[LT01-test/fixtures/linter/indentation_errors.sql1] __ 1787s 1787s rule = 'LT01', fname = 'test/fixtures/linter/indentation_errors.sql' 1787s 1787s @pytest.mark.parametrize( 1787s "rule,fname", 1787s [ 1787s ("LT01", "test/fixtures/linter/indentation_errors.sql"), 1787s ("LT01", "test/fixtures/linter/whitespace_errors.sql"), 1787s ("LT01", "test/fixtures/linter/indentation_errors.sql"), 1787s # Really stretching the ability of the fixer to re-indent a file 1787s ("LT02", "test/fixtures/linter/indentation_error_hard.sql"), 1787s ], 1787s ) 1787s def test__cli__command__fix(rule, fname): 1787s """Test the round trip of detecting, fixing and then not detecting the rule.""" 1787s with open(fname) as test_file: 1787s > generic_roundtrip_test(test_file, rule) 1787s 1787s test/cli/commands_test.py:972: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s test/cli/commands_test.py:928: in generic_roundtrip_test 1787s invoke_assert_code( 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ['--dialect=ansi', '--rules', 'LT01', '/tmp/tmpkaaoi5wj/testing.sql']] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command__fix[LT02-test/fixtures/linter/indentation_error_hard.sql] _ 1787s 1787s rule = 'LT02', fname = 'test/fixtures/linter/indentation_error_hard.sql' 1787s 1787s @pytest.mark.parametrize( 1787s "rule,fname", 1787s [ 1787s ("LT01", "test/fixtures/linter/indentation_errors.sql"), 1787s ("LT01", "test/fixtures/linter/whitespace_errors.sql"), 1787s ("LT01", "test/fixtures/linter/indentation_errors.sql"), 1787s # Really stretching the ability of the fixer to re-indent a file 1787s ("LT02", "test/fixtures/linter/indentation_error_hard.sql"), 1787s ], 1787s ) 1787s def test__cli__command__fix(rule, fname): 1787s """Test the round trip of detecting, fixing and then not detecting the rule.""" 1787s with open(fname) as test_file: 1787s > generic_roundtrip_test(test_file, rule) 1787s 1787s test/cli/commands_test.py:972: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s test/cli/commands_test.py:928: in generic_roundtrip_test 1787s invoke_assert_code( 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ['--dialect=ansi', '--rules', 'LT02', '/tmp/tmp42otafer/testing.sql']] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _______________ test_cli_fix_even_unparsable[command-line-False] _______________ 1787s 1787s method = 'command-line', fix_even_unparsable = False 1787s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf1747ff0> 1787s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_cli_fix_even_unparsable_c0') 1787s 1787s @pytest.mark.parametrize( 1787s "method,fix_even_unparsable", 1787s [ 1787s ("command-line", False), 1787s ("command-line", True), 1787s ("config-file", False), 1787s ("config-file", True), 1787s ], 1787s ) 1787s def test_cli_fix_even_unparsable( 1787s method: str, fix_even_unparsable: bool, monkeypatch, tmpdir 1787s ): 1787s """Test the fix_even_unparsable option works from cmd line and config.""" 1787s sql_filename = "fix_even_unparsable.sql" 1787s sql_path = str(tmpdir / sql_filename) 1787s with open(sql_path, "w") as f: 1787s print( 1787s """SELECT my_col 1787s FROM my_schema.my_table 1787s where processdate ! 3 1787s """, 1787s file=f, 1787s ) 1787s options = [ 1787s "--dialect", 1787s "ansi", 1787s "--fixed-suffix=FIXED", 1787s sql_path, 1787s ] 1787s if method == "command-line": 1787s if fix_even_unparsable: 1787s options.append("--FIX-EVEN-UNPARSABLE") 1787s else: 1787s assert method == "config-file" 1787s with open(str(tmpdir / ".sqlfluff"), "w") as f: 1787s print( 1787s f"[sqlfluff]\nfix_even_unparsable = {fix_even_unparsable}", 1787s file=f, 1787s ) 1787s # TRICKY: Switch current directory to the one with the SQL file. Otherwise, 1787s # the setting doesn't work. That's because SQLFluff reads it in 1787s # sqlfluff.cli.commands.fix(), prior to reading any file-specific settings 1787s # (down in sqlfluff.core.linter.Linter._load_raw_file_and_config()). 1787s monkeypatch.chdir(str(tmpdir)) 1787s > invoke_assert_code( 1787s ret_code=0 if fix_even_unparsable else 1, 1787s args=[ 1787s fix, 1787s options, 1787s ], 1787s ) 1787s 1787s /tmp/autopkgtest.MdGcw7/autopkgtest_tmp/test/cli/commands_test.py:1178: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ['--dialect', 'ansi', '--fixed-suffix=FIXED', '/tmp/pytest-of-ubuntu/pytest-0/test_cli_fix_even_unparsable_c0/fix_even_unparsable.sql']] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _______________ test_cli_fix_even_unparsable[command-line-True] ________________ 1787s 1787s method = 'command-line', fix_even_unparsable = True 1787s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf17472e8> 1787s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_cli_fix_even_unparsable_c1') 1787s 1787s @pytest.mark.parametrize( 1787s "method,fix_even_unparsable", 1787s [ 1787s ("command-line", False), 1787s ("command-line", True), 1787s ("config-file", False), 1787s ("config-file", True), 1787s ], 1787s ) 1787s def test_cli_fix_even_unparsable( 1787s method: str, fix_even_unparsable: bool, monkeypatch, tmpdir 1787s ): 1787s """Test the fix_even_unparsable option works from cmd line and config.""" 1787s sql_filename = "fix_even_unparsable.sql" 1787s sql_path = str(tmpdir / sql_filename) 1787s with open(sql_path, "w") as f: 1787s print( 1787s """SELECT my_col 1787s FROM my_schema.my_table 1787s where processdate ! 3 1787s """, 1787s file=f, 1787s ) 1787s options = [ 1787s "--dialect", 1787s "ansi", 1787s "--fixed-suffix=FIXED", 1787s sql_path, 1787s ] 1787s if method == "command-line": 1787s if fix_even_unparsable: 1787s options.append("--FIX-EVEN-UNPARSABLE") 1787s else: 1787s assert method == "config-file" 1787s with open(str(tmpdir / ".sqlfluff"), "w") as f: 1787s print( 1787s f"[sqlfluff]\nfix_even_unparsable = {fix_even_unparsable}", 1787s file=f, 1787s ) 1787s # TRICKY: Switch current directory to the one with the SQL file. Otherwise, 1787s # the setting doesn't work. That's because SQLFluff reads it in 1787s # sqlfluff.cli.commands.fix(), prior to reading any file-specific settings 1787s # (down in sqlfluff.core.linter.Linter._load_raw_file_and_config()). 1787s monkeypatch.chdir(str(tmpdir)) 1787s > invoke_assert_code( 1787s ret_code=0 if fix_even_unparsable else 1, 1787s args=[ 1787s fix, 1787s options, 1787s ], 1787s ) 1787s 1787s /tmp/autopkgtest.MdGcw7/autopkgtest_tmp/test/cli/commands_test.py:1178: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = [, ['--dialect', 'ansi', '--fixed-suffix=FIXED', '/tmp/pytest-of-ubuntu/pytest-0/test_cli_fix_even_unparsable_c1/fix_even_unparsable.sql', '--FIX-EVEN-UNPARSABLE']] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _______________ test_cli_fix_even_unparsable[config-file-False] ________________ 1787s 1787s method = 'config-file', fix_even_unparsable = False 1787s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf1742660> 1787s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_cli_fix_even_unparsable_c2') 1787s 1787s @pytest.mark.parametrize( 1787s "method,fix_even_unparsable", 1787s [ 1787s ("command-line", False), 1787s ("command-line", True), 1787s ("config-file", False), 1787s ("config-file", True), 1787s ], 1787s ) 1787s def test_cli_fix_even_unparsable( 1787s method: str, fix_even_unparsable: bool, monkeypatch, tmpdir 1787s ): 1787s """Test the fix_even_unparsable option works from cmd line and config.""" 1787s sql_filename = "fix_even_unparsable.sql" 1787s sql_path = str(tmpdir / sql_filename) 1787s with open(sql_path, "w") as f: 1787s print( 1787s """SELECT my_col 1787s FROM my_schema.my_table 1787s where processdate ! 3 1787s """, 1787s file=f, 1787s ) 1787s options = [ 1787s "--dialect", 1787s "ansi", 1787s "--fixed-suffix=FIXED", 1787s sql_path, 1787s ] 1787s if method == "command-line": 1787s if fix_even_unparsable: 1787s options.append("--FIX-EVEN-UNPARSABLE") 1787s else: 1787s assert method == "config-file" 1787s with open(str(tmpdir / ".sqlfluff"), "w") as f: 1787s print( 1787s f"[sqlfluff]\nfix_even_unparsable = {fix_even_unparsable}", 1787s file=f, 1787s ) 1787s # TRICKY: Switch current directory to the one with the SQL file. Otherwise, 1787s # the setting doesn't work. That's because SQLFluff reads it in 1787s # sqlfluff.cli.commands.fix(), prior to reading any file-specific settings 1787s # (down in sqlfluff.core.linter.Linter._load_raw_file_and_config()). 1787s monkeypatch.chdir(str(tmpdir)) 1787s > invoke_assert_code( 1787s ret_code=0 if fix_even_unparsable else 1, 1787s args=[ 1787s fix, 1787s options, 1787s ], 1787s ) 1787s 1787s /tmp/autopkgtest.MdGcw7/autopkgtest_tmp/test/cli/commands_test.py:1178: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ['--dialect', 'ansi', '--fixed-suffix=FIXED', '/tmp/pytest-of-ubuntu/pytest-0/test_cli_fix_even_unparsable_c2/fix_even_unparsable.sql']] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ________________ test_cli_fix_even_unparsable[config-file-True] ________________ 1787s 1787s method = 'config-file', fix_even_unparsable = True 1787s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf17bca68> 1787s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_cli_fix_even_unparsable_c3') 1787s 1787s @pytest.mark.parametrize( 1787s "method,fix_even_unparsable", 1787s [ 1787s ("command-line", False), 1787s ("command-line", True), 1787s ("config-file", False), 1787s ("config-file", True), 1787s ], 1787s ) 1787s def test_cli_fix_even_unparsable( 1787s method: str, fix_even_unparsable: bool, monkeypatch, tmpdir 1787s ): 1787s """Test the fix_even_unparsable option works from cmd line and config.""" 1787s sql_filename = "fix_even_unparsable.sql" 1787s sql_path = str(tmpdir / sql_filename) 1787s with open(sql_path, "w") as f: 1787s print( 1787s """SELECT my_col 1787s FROM my_schema.my_table 1787s where processdate ! 3 1787s """, 1787s file=f, 1787s ) 1787s options = [ 1787s "--dialect", 1787s "ansi", 1787s "--fixed-suffix=FIXED", 1787s sql_path, 1787s ] 1787s if method == "command-line": 1787s if fix_even_unparsable: 1787s options.append("--FIX-EVEN-UNPARSABLE") 1787s else: 1787s assert method == "config-file" 1787s with open(str(tmpdir / ".sqlfluff"), "w") as f: 1787s print( 1787s f"[sqlfluff]\nfix_even_unparsable = {fix_even_unparsable}", 1787s file=f, 1787s ) 1787s # TRICKY: Switch current directory to the one with the SQL file. Otherwise, 1787s # the setting doesn't work. That's because SQLFluff reads it in 1787s # sqlfluff.cli.commands.fix(), prior to reading any file-specific settings 1787s # (down in sqlfluff.core.linter.Linter._load_raw_file_and_config()). 1787s monkeypatch.chdir(str(tmpdir)) 1787s > invoke_assert_code( 1787s ret_code=0 if fix_even_unparsable else 1, 1787s args=[ 1787s fix, 1787s options, 1787s ], 1787s ) 1787s 1787s /tmp/autopkgtest.MdGcw7/autopkgtest_tmp/test/cli/commands_test.py:1178: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = [, ['--dialect', 'ansi', '--fixed-suffix=FIXED', '/tmp/pytest-of-ubuntu/pytest-0/test_cli_fix_even_unparsable_c3/fix_even_unparsable.sql']] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ______ test__cli__command_fix_stdin[select * from t-LT02-select * from t] ______ 1787s 1787s stdin = 'select * from t', rules = 'LT02', stdout = 'select * from t' 1787s 1787s @pytest.mark.parametrize( 1787s "stdin,rules,stdout", 1787s [ 1787s ("select * from t", "LT02", "select * from t"), # no change 1787s ( 1787s " select * from t", 1787s "LT02", 1787s "select * from t", 1787s ), # fix preceding whitespace 1787s ], 1787s ) 1787s def test__cli__command_fix_stdin(stdin, rules, stdout): 1787s """Check stdin input for fix works.""" 1787s > result = invoke_assert_code( 1787s args=[ 1787s fix, 1787s ("-", "--rules", rules, "--disable-progress-bar", "--dialect=ansi"), 1787s ], 1787s cli_input=stdin, 1787s ) 1787s 1787s test/cli/commands_test.py:1213: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = [, ('-', '--rules', 'LT02', '--disable-progress-bar', '--dialect=ansi')] 1787s kwargs = {'input': 'select * from t'}, cli_input = 'select * from t' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _____ test__cli__command_fix_stdin[ select * from t-LT02-select * from t] ______ 1787s 1787s stdin = ' select * from t', rules = 'LT02', stdout = 'select * from t' 1787s 1787s @pytest.mark.parametrize( 1787s "stdin,rules,stdout", 1787s [ 1787s ("select * from t", "LT02", "select * from t"), # no change 1787s ( 1787s " select * from t", 1787s "LT02", 1787s "select * from t", 1787s ), # fix preceding whitespace 1787s ], 1787s ) 1787s def test__cli__command_fix_stdin(stdin, rules, stdout): 1787s """Check stdin input for fix works.""" 1787s > result = invoke_assert_code( 1787s args=[ 1787s fix, 1787s ("-", "--rules", rules, "--disable-progress-bar", "--dialect=ansi"), 1787s ], 1787s cli_input=stdin, 1787s ) 1787s 1787s test/cli/commands_test.py:1213: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = [, ('-', '--rules', 'LT02', '--disable-progress-bar', '--dialect=ansi')] 1787s kwargs = {'input': ' select * from t'}, cli_input = ' select * from t' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _____ test__cli__command_format_stdin[select * from t\n-select * from t\n] _____ 1787s 1787s stdin = 'select * from t\n', stdout = 'select * from t\n' 1787s 1787s @pytest.mark.parametrize( 1787s "stdin,stdout", 1787s [ 1787s ("select * from t\n", "select * from t\n"), # no change 1787s ( 1787s " select * FRoM t ", 1787s "select * from t\n", 1787s ), 1787s ( 1787s # Check that warnings related to parsing errors on input don't 1787s # go to stdout. This query shouldn't change, but stdout should 1787s # remain clean. 1787s # https://github.com/sqlfluff/sqlfluff/issues/5327 1787s "select\n" 1787s " count(*) over (\n" 1787s " order by a desc \n" 1787s " range between b row and '10 seconds' following -- noqa: PRS\n" 1787s " ) as c\n" 1787s "from d\n", 1787s "select\n" 1787s " count(*) over (\n" 1787s " order by a desc \n" 1787s " range between b row and '10 seconds' following -- noqa: PRS\n" 1787s " ) as c\n" 1787s "from d\n", 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_format_stdin(stdin, stdout): 1787s """Check stdin input for fix works.""" 1787s > result = invoke_assert_code( 1787s args=[ 1787s cli_format, 1787s ("-", "--disable-progress-bar", "--dialect=ansi"), 1787s ], 1787s cli_input=stdin, 1787s mix_stderr=False, 1787s ) 1787s 1787s test/cli/commands_test.py:1253: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = [, ('-', '--disable-progress-bar', '--dialect=ansi')] 1787s kwargs = {'input': 'select * from t\n'}, cli_input = 'select * from t\n' 1787s mix_stderr = False, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command_format_stdin[ select * FRoM t -select * from t\n] _ 1787s 1787s stdin = ' select * FRoM t ', stdout = 'select * from t\n' 1787s 1787s @pytest.mark.parametrize( 1787s "stdin,stdout", 1787s [ 1787s ("select * from t\n", "select * from t\n"), # no change 1787s ( 1787s " select * FRoM t ", 1787s "select * from t\n", 1787s ), 1787s ( 1787s # Check that warnings related to parsing errors on input don't 1787s # go to stdout. This query shouldn't change, but stdout should 1787s # remain clean. 1787s # https://github.com/sqlfluff/sqlfluff/issues/5327 1787s "select\n" 1787s " count(*) over (\n" 1787s " order by a desc \n" 1787s " range between b row and '10 seconds' following -- noqa: PRS\n" 1787s " ) as c\n" 1787s "from d\n", 1787s "select\n" 1787s " count(*) over (\n" 1787s " order by a desc \n" 1787s " range between b row and '10 seconds' following -- noqa: PRS\n" 1787s " ) as c\n" 1787s "from d\n", 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_format_stdin(stdin, stdout): 1787s """Check stdin input for fix works.""" 1787s > result = invoke_assert_code( 1787s args=[ 1787s cli_format, 1787s ("-", "--disable-progress-bar", "--dialect=ansi"), 1787s ], 1787s cli_input=stdin, 1787s mix_stderr=False, 1787s ) 1787s 1787s test/cli/commands_test.py:1253: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = [, ('-', '--disable-progress-bar', '--dialect=ansi')] 1787s kwargs = {'input': ' select * FRoM t '} 1787s cli_input = ' select * FRoM t ', mix_stderr = False 1787s assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command_format_stdin[select\n count(*) over (\n order by a desc \n range between b row and '10 seconds' following -- noqa: PRS\n ) as c\nfrom d\n-select\n count(*) over (\n order by a desc \n range between b row and '10 seconds' following -- noqa: PRS\n ) as c\nfrom d\n] _ 1787s 1787s stdin = "select\n count(*) over (\n order by a desc \n range between b row and '10 seconds' following -- noqa: PRS\n ) as c\nfrom d\n" 1787s stdout = "select\n count(*) over (\n order by a desc \n range between b row and '10 seconds' following -- noqa: PRS\n ) as c\nfrom d\n" 1787s 1787s @pytest.mark.parametrize( 1787s "stdin,stdout", 1787s [ 1787s ("select * from t\n", "select * from t\n"), # no change 1787s ( 1787s " select * FRoM t ", 1787s "select * from t\n", 1787s ), 1787s ( 1787s # Check that warnings related to parsing errors on input don't 1787s # go to stdout. This query shouldn't change, but stdout should 1787s # remain clean. 1787s # https://github.com/sqlfluff/sqlfluff/issues/5327 1787s "select\n" 1787s " count(*) over (\n" 1787s " order by a desc \n" 1787s " range between b row and '10 seconds' following -- noqa: PRS\n" 1787s " ) as c\n" 1787s "from d\n", 1787s "select\n" 1787s " count(*) over (\n" 1787s " order by a desc \n" 1787s " range between b row and '10 seconds' following -- noqa: PRS\n" 1787s " ) as c\n" 1787s "from d\n", 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_format_stdin(stdin, stdout): 1787s """Check stdin input for fix works.""" 1787s > result = invoke_assert_code( 1787s args=[ 1787s cli_format, 1787s ("-", "--disable-progress-bar", "--dialect=ansi"), 1787s ], 1787s cli_input=stdin, 1787s mix_stderr=False, 1787s ) 1787s 1787s test/cli/commands_test.py:1253: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = [, ('-', '--disable-progress-bar', '--dialect=ansi')] 1787s kwargs = {'input': "select\n count(*) over (\n order by a desc \n range between b row and '10 seconds' following -- noqa: PRS\n ) as c\nfrom d\n"} 1787s cli_input = "select\n count(*) over (\n order by a desc \n range between b row and '10 seconds' following -- noqa: PRS\n ) as c\nfrom d\n" 1787s mix_stderr = False, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ________________ test__cli__command_fix_stdin_logging_to_stderr ________________ 1787s 1787s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf17423c0> 1787s 1787s def test__cli__command_fix_stdin_logging_to_stderr(monkeypatch): 1787s """Check that logging goes to stderr when stdin is passed to fix.""" 1787s perfect_sql = "select col from table" 1787s 1787s class MockLinter(sqlfluff.core.Linter): 1787s @classmethod 1787s def lint_fix_parsed(cls, *args, **kwargs): 1787s cls._warn_unfixable("") 1787s return super().lint_fix_parsed(*args, **kwargs) 1787s 1787s monkeypatch.setattr(sqlfluff.cli.commands, "Linter", MockLinter) 1787s > result = invoke_assert_code( 1787s args=[fix, ("-", "--rules=LT02", "--dialect=ansi")], 1787s cli_input=perfect_sql, 1787s mix_stderr=False, 1787s ) 1787s 1787s test/cli/commands_test.py:1275: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0, args = [, ('-', '--rules=LT02', '--dialect=ansi')] 1787s kwargs = {'input': 'select col from table'}, cli_input = 'select col from table' 1787s mix_stderr = False, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _____________________ test__cli__command_fix_stdin_safety ______________________ 1787s 1787s def test__cli__command_fix_stdin_safety(): 1787s """Check edge cases regarding safety when fixing stdin.""" 1787s perfect_sql = "select col from table" 1787s 1787s # just prints the very same thing 1787s > result = invoke_assert_code( 1787s args=[fix, ("-", "--disable-progress-bar", "--dialect=ansi")], 1787s cli_input=perfect_sql, 1787s ) 1787s 1787s test/cli/commands_test.py:1290: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = [, ('-', '--disable-progress-bar', '--dialect=ansi')] 1787s kwargs = {'input': 'select col from table'}, cli_input = 'select col from table' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command_fix_stdin_error_exit_code[create TABLE {{ params.dsfsdfds }}.t (a int)-1--v-Fix aborted due to unparsable template variables.] _ 1787s 1787s sql = 'create TABLE {{ params.dsfsdfds }}.t (a int)', exit_code = 1 1787s params = '-v' 1787s assert_output_contains = 'Fix aborted due to unparsable template variables.' 1787s 1787s @pytest.mark.parametrize( 1787s "sql,exit_code,params,assert_output_contains", 1787s [ 1787s ( 1787s "create TABLE {{ params.dsfsdfds }}.t (a int)", 1787s 1, 1787s "-v", 1787s "Fix aborted due to unparsable template variables.", 1787s ), # template error 1787s ("create TABLE a.t (a int)", 0, "", ""), # fixable error 1787s ("create table a.t (a int)", 0, "", ""), # perfection 1787s ( 1787s "select col from a join b using (c)", 1787s 1, 1787s "-v", 1787s "Unfixable violations detected.", 1787s ), # unfixable error (using) 1787s ], 1787s ) 1787s def test__cli__command_fix_stdin_error_exit_code( 1787s sql, exit_code, params, assert_output_contains 1787s ): 1787s """Check that the CLI fails nicely if fixing a templated stdin.""" 1787s > invoke_assert_code( 1787s ret_code=exit_code, 1787s args=[fix, ((params,) if params else ()) + ("--dialect=ansi", "-")], 1787s cli_input=sql, 1787s assert_output_contains=assert_output_contains, 1787s ) 1787s 1787s test/cli/commands_test.py:1320: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1, args = [, ('-v', '--dialect=ansi', '-')] 1787s kwargs = {'input': 'create TABLE {{ params.dsfsdfds }}.t (a int)'} 1787s cli_input = 'create TABLE {{ params.dsfsdfds }}.t (a int)', mix_stderr = True 1787s assert_output_contains = 'Fix aborted due to unparsable template variables.' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s __ test__cli__command_fix_stdin_error_exit_code[create TABLE a.t (a int)-0--] __ 1787s 1787s sql = 'create TABLE a.t (a int)', exit_code = 0, params = '' 1787s assert_output_contains = '' 1787s 1787s @pytest.mark.parametrize( 1787s "sql,exit_code,params,assert_output_contains", 1787s [ 1787s ( 1787s "create TABLE {{ params.dsfsdfds }}.t (a int)", 1787s 1, 1787s "-v", 1787s "Fix aborted due to unparsable template variables.", 1787s ), # template error 1787s ("create TABLE a.t (a int)", 0, "", ""), # fixable error 1787s ("create table a.t (a int)", 0, "", ""), # perfection 1787s ( 1787s "select col from a join b using (c)", 1787s 1, 1787s "-v", 1787s "Unfixable violations detected.", 1787s ), # unfixable error (using) 1787s ], 1787s ) 1787s def test__cli__command_fix_stdin_error_exit_code( 1787s sql, exit_code, params, assert_output_contains 1787s ): 1787s """Check that the CLI fails nicely if fixing a templated stdin.""" 1787s > invoke_assert_code( 1787s ret_code=exit_code, 1787s args=[fix, ((params,) if params else ()) + ("--dialect=ansi", "-")], 1787s cli_input=sql, 1787s assert_output_contains=assert_output_contains, 1787s ) 1787s 1787s test/cli/commands_test.py:1320: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0, args = [, ('--dialect=ansi', '-')] 1787s kwargs = {'input': 'create TABLE a.t (a int)'} 1787s cli_input = 'create TABLE a.t (a int)', mix_stderr = True 1787s assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s __ test__cli__command_fix_stdin_error_exit_code[create table a.t (a int)-0--] __ 1787s 1787s sql = 'create table a.t (a int)', exit_code = 0, params = '' 1787s assert_output_contains = '' 1787s 1787s @pytest.mark.parametrize( 1787s "sql,exit_code,params,assert_output_contains", 1787s [ 1787s ( 1787s "create TABLE {{ params.dsfsdfds }}.t (a int)", 1787s 1, 1787s "-v", 1787s "Fix aborted due to unparsable template variables.", 1787s ), # template error 1787s ("create TABLE a.t (a int)", 0, "", ""), # fixable error 1787s ("create table a.t (a int)", 0, "", ""), # perfection 1787s ( 1787s "select col from a join b using (c)", 1787s 1, 1787s "-v", 1787s "Unfixable violations detected.", 1787s ), # unfixable error (using) 1787s ], 1787s ) 1787s def test__cli__command_fix_stdin_error_exit_code( 1787s sql, exit_code, params, assert_output_contains 1787s ): 1787s """Check that the CLI fails nicely if fixing a templated stdin.""" 1787s > invoke_assert_code( 1787s ret_code=exit_code, 1787s args=[fix, ((params,) if params else ()) + ("--dialect=ansi", "-")], 1787s cli_input=sql, 1787s assert_output_contains=assert_output_contains, 1787s ) 1787s 1787s test/cli/commands_test.py:1320: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0, args = [, ('--dialect=ansi', '-')] 1787s kwargs = {'input': 'create table a.t (a int)'} 1787s cli_input = 'create table a.t (a int)', mix_stderr = True 1787s assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command_fix_stdin_error_exit_code[select col from a join b using (c)-1--v-Unfixable violations detected.] _ 1787s 1787s sql = 'select col from a join b using (c)', exit_code = 1, params = '-v' 1787s assert_output_contains = 'Unfixable violations detected.' 1787s 1787s @pytest.mark.parametrize( 1787s "sql,exit_code,params,assert_output_contains", 1787s [ 1787s ( 1787s "create TABLE {{ params.dsfsdfds }}.t (a int)", 1787s 1, 1787s "-v", 1787s "Fix aborted due to unparsable template variables.", 1787s ), # template error 1787s ("create TABLE a.t (a int)", 0, "", ""), # fixable error 1787s ("create table a.t (a int)", 0, "", ""), # perfection 1787s ( 1787s "select col from a join b using (c)", 1787s 1, 1787s "-v", 1787s "Unfixable violations detected.", 1787s ), # unfixable error (using) 1787s ], 1787s ) 1787s def test__cli__command_fix_stdin_error_exit_code( 1787s sql, exit_code, params, assert_output_contains 1787s ): 1787s """Check that the CLI fails nicely if fixing a templated stdin.""" 1787s > invoke_assert_code( 1787s ret_code=exit_code, 1787s args=[fix, ((params,) if params else ()) + ("--dialect=ansi", "-")], 1787s cli_input=sql, 1787s assert_output_contains=assert_output_contains, 1787s ) 1787s 1787s test/cli/commands_test.py:1320: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1, args = [, ('-v', '--dialect=ansi', '-')] 1787s kwargs = {'input': 'select col from a join b using (c)'} 1787s cli_input = 'select col from a join b using (c)', mix_stderr = True 1787s assert_output_contains = 'Unfixable violations detected.' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command__fix_check[LT01-test/fixtures/linter/indentation_errors.sql-y-0-0] _ 1787s 1787s rule = 'LT01', fname = 'test/fixtures/linter/indentation_errors.sql' 1787s prompt = 'y', exit_code = 0, fix_exit_code = 0 1787s 1787s @pytest.mark.parametrize( 1787s "rule,fname,prompt,exit_code,fix_exit_code", 1787s [ 1787s ("LT01", "test/fixtures/linter/indentation_errors.sql", "y", 0, 0), 1787s ("LT01", "test/fixtures/linter/indentation_errors.sql", "n", 1, 1), 1787s ], 1787s ) 1787s def test__cli__command__fix_check(rule, fname, prompt, exit_code, fix_exit_code): 1787s """Round trip test, using the prompts.""" 1787s with open(fname) as test_file: 1787s > generic_roundtrip_test( 1787s test_file, 1787s rule, 1787s check=True, 1787s final_exit_code=exit_code, 1787s fix_input=prompt, 1787s fix_exit_code=fix_exit_code, 1787s ) 1787s 1787s test/cli/commands_test.py:1338: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s test/cli/commands_test.py:928: in generic_roundtrip_test 1787s invoke_assert_code( 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ['--dialect=ansi', '--rules', 'LT01', '/tmp/tmp892ax55c/testing.sql']] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command__fix_check[LT01-test/fixtures/linter/indentation_errors.sql-n-1-1] _ 1787s 1787s rule = 'LT01', fname = 'test/fixtures/linter/indentation_errors.sql' 1787s prompt = 'n', exit_code = 1, fix_exit_code = 1 1787s 1787s @pytest.mark.parametrize( 1787s "rule,fname,prompt,exit_code,fix_exit_code", 1787s [ 1787s ("LT01", "test/fixtures/linter/indentation_errors.sql", "y", 0, 0), 1787s ("LT01", "test/fixtures/linter/indentation_errors.sql", "n", 1, 1), 1787s ], 1787s ) 1787s def test__cli__command__fix_check(rule, fname, prompt, exit_code, fix_exit_code): 1787s """Round trip test, using the prompts.""" 1787s with open(fname) as test_file: 1787s > generic_roundtrip_test( 1787s test_file, 1787s rule, 1787s check=True, 1787s final_exit_code=exit_code, 1787s fix_input=prompt, 1787s fix_exit_code=fix_exit_code, 1787s ) 1787s 1787s test/cli/commands_test.py:1338: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s test/cli/commands_test.py:928: in generic_roundtrip_test 1787s invoke_assert_code( 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ['--dialect=ansi', '--rules', 'LT01', '/tmp/tmp8n0e_9x8/testing.sql']] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________ test__cli__command_parse_serialize_from_stdin[None-yaml] ___________ 1787s 1787s serialize = 'yaml', write_file = None 1787s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_parse_seria0') 1787s 1787s @pytest.mark.parametrize("serialize", ["yaml", "json"]) 1787s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1787s def test__cli__command_parse_serialize_from_stdin(serialize, write_file, tmp_path): 1787s """Check that the parser serialized output option is working. 1787s 1787s This tests both output to stdout and output to file. 1787s 1787s Not going to test for the content of the output as that is subject to change. 1787s """ 1787s cmd_args = ("-", "--format", serialize, "--dialect=ansi") 1787s 1787s if write_file: 1787s target_file = os.path.join(tmp_path, write_file + "." + serialize) 1787s cmd_args += ("--write-output", target_file) 1787s 1787s > result = invoke_assert_code( 1787s args=[parse, cmd_args], 1787s cli_input="select * from tbl", 1787s ) 1787s 1787s test/cli/commands_test.py:1363: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = [, ('-', '--format', 'yaml', '--dialect=ansi')] 1787s kwargs = {'input': 'select * from tbl'}, cli_input = 'select * from tbl' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___________ test__cli__command_parse_serialize_from_stdin[None-json] ___________ 1787s 1787s serialize = 'json', write_file = None 1787s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_parse_seria1') 1787s 1787s @pytest.mark.parametrize("serialize", ["yaml", "json"]) 1787s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1787s def test__cli__command_parse_serialize_from_stdin(serialize, write_file, tmp_path): 1787s """Check that the parser serialized output option is working. 1787s 1787s This tests both output to stdout and output to file. 1787s 1787s Not going to test for the content of the output as that is subject to change. 1787s """ 1787s cmd_args = ("-", "--format", serialize, "--dialect=ansi") 1787s 1787s if write_file: 1787s target_file = os.path.join(tmp_path, write_file + "." + serialize) 1787s cmd_args += ("--write-output", target_file) 1787s 1787s > result = invoke_assert_code( 1787s args=[parse, cmd_args], 1787s cli_input="select * from tbl", 1787s ) 1787s 1787s test/cli/commands_test.py:1363: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = [, ('-', '--format', 'json', '--dialect=ansi')] 1787s kwargs = {'input': 'select * from tbl'}, cli_input = 'select * from tbl' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _________ test__cli__command_parse_serialize_from_stdin[outfile-yaml] __________ 1787s 1787s serialize = 'yaml', write_file = 'outfile' 1787s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_parse_seria2') 1787s 1787s @pytest.mark.parametrize("serialize", ["yaml", "json"]) 1787s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1787s def test__cli__command_parse_serialize_from_stdin(serialize, write_file, tmp_path): 1787s """Check that the parser serialized output option is working. 1787s 1787s This tests both output to stdout and output to file. 1787s 1787s Not going to test for the content of the output as that is subject to change. 1787s """ 1787s cmd_args = ("-", "--format", serialize, "--dialect=ansi") 1787s 1787s if write_file: 1787s target_file = os.path.join(tmp_path, write_file + "." + serialize) 1787s cmd_args += ("--write-output", target_file) 1787s 1787s > result = invoke_assert_code( 1787s args=[parse, cmd_args], 1787s cli_input="select * from tbl", 1787s ) 1787s 1787s test/cli/commands_test.py:1363: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = [, ('-', '--format', 'yaml', '--dialect=ansi', '--write-output', '/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_parse_seria2/outfile.yaml')] 1787s kwargs = {'input': 'select * from tbl'}, cli_input = 'select * from tbl' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _________ test__cli__command_parse_serialize_from_stdin[outfile-json] __________ 1787s 1787s serialize = 'json', write_file = 'outfile' 1787s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_parse_seria3') 1787s 1787s @pytest.mark.parametrize("serialize", ["yaml", "json"]) 1787s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1787s def test__cli__command_parse_serialize_from_stdin(serialize, write_file, tmp_path): 1787s """Check that the parser serialized output option is working. 1787s 1787s This tests both output to stdout and output to file. 1787s 1787s Not going to test for the content of the output as that is subject to change. 1787s """ 1787s cmd_args = ("-", "--format", serialize, "--dialect=ansi") 1787s 1787s if write_file: 1787s target_file = os.path.join(tmp_path, write_file + "." + serialize) 1787s cmd_args += ("--write-output", target_file) 1787s 1787s > result = invoke_assert_code( 1787s args=[parse, cmd_args], 1787s cli_input="select * from tbl", 1787s ) 1787s 1787s test/cli/commands_test.py:1363: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = [, ('-', '--format', 'json', '--dialect=ansi', '--write-output', '/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_parse_seria3/outfile.json')] 1787s kwargs = {'input': 'select * from tbl'}, cli_input = 'select * from tbl' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command_lint_serialize_from_stdin[select * from tbl-CP01-expected0-0-yaml] _ 1787s 1787s serialize = 'yaml', sql = 'select * from tbl', rules = 'CP01' 1787s expected = [{'filepath': 'stdin', 'statistics': {'raw_segments': 12, 'segments': 24, 'source_chars': 17, 'templated_chars': 17}, 'violations': []}] 1787s exit_code = 0 1787s 1787s @pytest.mark.parametrize("serialize", ["yaml", "json", "none"]) 1787s @pytest.mark.parametrize( 1787s "sql,rules,expected,exit_code", 1787s [ 1787s ( 1787s "select * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # Empty list because no violations. 1787s "violations": [], 1787s } 1787s ], 1787s 0, 1787s ), 1787s ( 1787s "SElect * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "SELECT", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s } 1787s ], 1787s }, 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "FROM", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s # Test serialisation with a source only fix. 1787s ( 1787s "SELECT {{1}}", 1787s "JJ01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "JJ01", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s "description": ( 1787s "Jinja tags should have a single whitespace on " 1787s "either side: {{1}}" 1787s ), 1787s "name": "jinja.padding", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "{{ 1 }}", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 6, 1787s "segments": 11, 1787s "source_chars": 12, 1787s "templated_chars": 8, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_serialize_from_stdin( 1787s serialize, sql, rules, expected, exit_code 1787s ): 1787s """Check an explicit serialized return value for a single error.""" 1787s > result = invoke_assert_code( 1787s args=[ 1787s lint, 1787s ( 1787s "-", 1787s "--rules", 1787s rules, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s "--dialect=ansi", 1787s ), 1787s ], 1787s cli_input=sql, 1787s ret_code=exit_code, 1787s ) 1787s 1787s test/cli/commands_test.py:1528: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = [, ('-', '--rules', 'CP01', '--format', 'yaml', '--disable-progress-bar', ...)] 1787s kwargs = {'input': 'select * from tbl'}, cli_input = 'select * from tbl' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command_lint_serialize_from_stdin[select * from tbl-CP01-expected0-0-json] _ 1787s 1787s serialize = 'json', sql = 'select * from tbl', rules = 'CP01' 1787s expected = [{'filepath': 'stdin', 'statistics': {'raw_segments': 12, 'segments': 24, 'source_chars': 17, 'templated_chars': 17}, 'violations': []}] 1787s exit_code = 0 1787s 1787s @pytest.mark.parametrize("serialize", ["yaml", "json", "none"]) 1787s @pytest.mark.parametrize( 1787s "sql,rules,expected,exit_code", 1787s [ 1787s ( 1787s "select * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # Empty list because no violations. 1787s "violations": [], 1787s } 1787s ], 1787s 0, 1787s ), 1787s ( 1787s "SElect * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "SELECT", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s } 1787s ], 1787s }, 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "FROM", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s # Test serialisation with a source only fix. 1787s ( 1787s "SELECT {{1}}", 1787s "JJ01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "JJ01", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s "description": ( 1787s "Jinja tags should have a single whitespace on " 1787s "either side: {{1}}" 1787s ), 1787s "name": "jinja.padding", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "{{ 1 }}", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 6, 1787s "segments": 11, 1787s "source_chars": 12, 1787s "templated_chars": 8, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_serialize_from_stdin( 1787s serialize, sql, rules, expected, exit_code 1787s ): 1787s """Check an explicit serialized return value for a single error.""" 1787s > result = invoke_assert_code( 1787s args=[ 1787s lint, 1787s ( 1787s "-", 1787s "--rules", 1787s rules, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s "--dialect=ansi", 1787s ), 1787s ], 1787s cli_input=sql, 1787s ret_code=exit_code, 1787s ) 1787s 1787s test/cli/commands_test.py:1528: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = [, ('-', '--rules', 'CP01', '--format', 'json', '--disable-progress-bar', ...)] 1787s kwargs = {'input': 'select * from tbl'}, cli_input = 'select * from tbl' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command_lint_serialize_from_stdin[select * from tbl-CP01-expected0-0-none] _ 1787s 1787s serialize = 'none', sql = 'select * from tbl', rules = 'CP01' 1787s expected = [{'filepath': 'stdin', 'statistics': {'raw_segments': 12, 'segments': 24, 'source_chars': 17, 'templated_chars': 17}, 'violations': []}] 1787s exit_code = 0 1787s 1787s @pytest.mark.parametrize("serialize", ["yaml", "json", "none"]) 1787s @pytest.mark.parametrize( 1787s "sql,rules,expected,exit_code", 1787s [ 1787s ( 1787s "select * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # Empty list because no violations. 1787s "violations": [], 1787s } 1787s ], 1787s 0, 1787s ), 1787s ( 1787s "SElect * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "SELECT", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s } 1787s ], 1787s }, 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "FROM", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s # Test serialisation with a source only fix. 1787s ( 1787s "SELECT {{1}}", 1787s "JJ01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "JJ01", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s "description": ( 1787s "Jinja tags should have a single whitespace on " 1787s "either side: {{1}}" 1787s ), 1787s "name": "jinja.padding", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "{{ 1 }}", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 6, 1787s "segments": 11, 1787s "source_chars": 12, 1787s "templated_chars": 8, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_serialize_from_stdin( 1787s serialize, sql, rules, expected, exit_code 1787s ): 1787s """Check an explicit serialized return value for a single error.""" 1787s > result = invoke_assert_code( 1787s args=[ 1787s lint, 1787s ( 1787s "-", 1787s "--rules", 1787s rules, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s "--dialect=ansi", 1787s ), 1787s ], 1787s cli_input=sql, 1787s ret_code=exit_code, 1787s ) 1787s 1787s test/cli/commands_test.py:1528: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 0 1787s args = [, ('-', '--rules', 'CP01', '--format', 'none', '--disable-progress-bar', ...)] 1787s kwargs = {'input': 'select * from tbl'}, cli_input = 'select * from tbl' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command_lint_serialize_from_stdin[SElect * from tbl-CP01-expected1-1-yaml] _ 1787s 1787s serialize = 'yaml', sql = 'SElect * from tbl', rules = 'CP01' 1787s expected = [{'filepath': 'stdin', 'statistics': {'raw_segments': 12, 'segments': 24, 'source_chars': 17, 'templated_chars': 17}, ...ode': 'CP01', 'description': 'Keywords must be consistently upper case.', 'end_file_pos': 13, 'end_line_no': 1, ...}]}] 1787s exit_code = 1 1787s 1787s @pytest.mark.parametrize("serialize", ["yaml", "json", "none"]) 1787s @pytest.mark.parametrize( 1787s "sql,rules,expected,exit_code", 1787s [ 1787s ( 1787s "select * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # Empty list because no violations. 1787s "violations": [], 1787s } 1787s ], 1787s 0, 1787s ), 1787s ( 1787s "SElect * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "SELECT", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s } 1787s ], 1787s }, 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "FROM", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s # Test serialisation with a source only fix. 1787s ( 1787s "SELECT {{1}}", 1787s "JJ01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "JJ01", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s "description": ( 1787s "Jinja tags should have a single whitespace on " 1787s "either side: {{1}}" 1787s ), 1787s "name": "jinja.padding", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "{{ 1 }}", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 6, 1787s "segments": 11, 1787s "source_chars": 12, 1787s "templated_chars": 8, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_serialize_from_stdin( 1787s serialize, sql, rules, expected, exit_code 1787s ): 1787s """Check an explicit serialized return value for a single error.""" 1787s > result = invoke_assert_code( 1787s args=[ 1787s lint, 1787s ( 1787s "-", 1787s "--rules", 1787s rules, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s "--dialect=ansi", 1787s ), 1787s ], 1787s cli_input=sql, 1787s ret_code=exit_code, 1787s ) 1787s 1787s test/cli/commands_test.py:1528: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('-', '--rules', 'CP01', '--format', 'yaml', '--disable-progress-bar', ...)] 1787s kwargs = {'input': 'SElect * from tbl'}, cli_input = 'SElect * from tbl' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command_lint_serialize_from_stdin[SElect * from tbl-CP01-expected1-1-json] _ 1787s 1787s serialize = 'json', sql = 'SElect * from tbl', rules = 'CP01' 1787s expected = [{'filepath': 'stdin', 'statistics': {'raw_segments': 12, 'segments': 24, 'source_chars': 17, 'templated_chars': 17}, ...ode': 'CP01', 'description': 'Keywords must be consistently upper case.', 'end_file_pos': 13, 'end_line_no': 1, ...}]}] 1787s exit_code = 1 1787s 1787s @pytest.mark.parametrize("serialize", ["yaml", "json", "none"]) 1787s @pytest.mark.parametrize( 1787s "sql,rules,expected,exit_code", 1787s [ 1787s ( 1787s "select * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # Empty list because no violations. 1787s "violations": [], 1787s } 1787s ], 1787s 0, 1787s ), 1787s ( 1787s "SElect * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "SELECT", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s } 1787s ], 1787s }, 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "FROM", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s # Test serialisation with a source only fix. 1787s ( 1787s "SELECT {{1}}", 1787s "JJ01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "JJ01", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s "description": ( 1787s "Jinja tags should have a single whitespace on " 1787s "either side: {{1}}" 1787s ), 1787s "name": "jinja.padding", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "{{ 1 }}", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 6, 1787s "segments": 11, 1787s "source_chars": 12, 1787s "templated_chars": 8, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_serialize_from_stdin( 1787s serialize, sql, rules, expected, exit_code 1787s ): 1787s """Check an explicit serialized return value for a single error.""" 1787s > result = invoke_assert_code( 1787s args=[ 1787s lint, 1787s ( 1787s "-", 1787s "--rules", 1787s rules, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s "--dialect=ansi", 1787s ), 1787s ], 1787s cli_input=sql, 1787s ret_code=exit_code, 1787s ) 1787s 1787s test/cli/commands_test.py:1528: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('-', '--rules', 'CP01', '--format', 'json', '--disable-progress-bar', ...)] 1787s kwargs = {'input': 'SElect * from tbl'}, cli_input = 'SElect * from tbl' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command_lint_serialize_from_stdin[SElect * from tbl-CP01-expected1-1-none] _ 1787s 1787s serialize = 'none', sql = 'SElect * from tbl', rules = 'CP01' 1787s expected = [{'filepath': 'stdin', 'statistics': {'raw_segments': 12, 'segments': 24, 'source_chars': 17, 'templated_chars': 17}, ...ode': 'CP01', 'description': 'Keywords must be consistently upper case.', 'end_file_pos': 13, 'end_line_no': 1, ...}]}] 1787s exit_code = 1 1787s 1787s @pytest.mark.parametrize("serialize", ["yaml", "json", "none"]) 1787s @pytest.mark.parametrize( 1787s "sql,rules,expected,exit_code", 1787s [ 1787s ( 1787s "select * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # Empty list because no violations. 1787s "violations": [], 1787s } 1787s ], 1787s 0, 1787s ), 1787s ( 1787s "SElect * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "SELECT", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s } 1787s ], 1787s }, 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "FROM", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s # Test serialisation with a source only fix. 1787s ( 1787s "SELECT {{1}}", 1787s "JJ01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "JJ01", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s "description": ( 1787s "Jinja tags should have a single whitespace on " 1787s "either side: {{1}}" 1787s ), 1787s "name": "jinja.padding", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "{{ 1 }}", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 6, 1787s "segments": 11, 1787s "source_chars": 12, 1787s "templated_chars": 8, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_serialize_from_stdin( 1787s serialize, sql, rules, expected, exit_code 1787s ): 1787s """Check an explicit serialized return value for a single error.""" 1787s > result = invoke_assert_code( 1787s args=[ 1787s lint, 1787s ( 1787s "-", 1787s "--rules", 1787s rules, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s "--dialect=ansi", 1787s ), 1787s ], 1787s cli_input=sql, 1787s ret_code=exit_code, 1787s ) 1787s 1787s test/cli/commands_test.py:1528: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('-', '--rules', 'CP01', '--format', 'none', '--disable-progress-bar', ...)] 1787s kwargs = {'input': 'SElect * from tbl'}, cli_input = 'SElect * from tbl' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command_lint_serialize_from_stdin[SELECT {{1}}-JJ01-expected2-1-yaml] _ 1787s 1787s serialize = 'yaml', sql = 'SELECT {{1}}', rules = 'JJ01' 1787s expected = [{'filepath': 'stdin', 'statistics': {'raw_segments': 6, 'segments': 11, 'source_chars': 12, 'templated_chars': 8}, 'v...ion': 'Jinja tags should have a single whitespace on either side: {{1}}', 'end_file_pos': 12, 'end_line_no': 1, ...}]}] 1787s exit_code = 1 1787s 1787s @pytest.mark.parametrize("serialize", ["yaml", "json", "none"]) 1787s @pytest.mark.parametrize( 1787s "sql,rules,expected,exit_code", 1787s [ 1787s ( 1787s "select * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # Empty list because no violations. 1787s "violations": [], 1787s } 1787s ], 1787s 0, 1787s ), 1787s ( 1787s "SElect * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "SELECT", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s } 1787s ], 1787s }, 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "FROM", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s # Test serialisation with a source only fix. 1787s ( 1787s "SELECT {{1}}", 1787s "JJ01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "JJ01", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s "description": ( 1787s "Jinja tags should have a single whitespace on " 1787s "either side: {{1}}" 1787s ), 1787s "name": "jinja.padding", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "{{ 1 }}", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 6, 1787s "segments": 11, 1787s "source_chars": 12, 1787s "templated_chars": 8, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_serialize_from_stdin( 1787s serialize, sql, rules, expected, exit_code 1787s ): 1787s """Check an explicit serialized return value for a single error.""" 1787s > result = invoke_assert_code( 1787s args=[ 1787s lint, 1787s ( 1787s "-", 1787s "--rules", 1787s rules, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s "--dialect=ansi", 1787s ), 1787s ], 1787s cli_input=sql, 1787s ret_code=exit_code, 1787s ) 1787s 1787s test/cli/commands_test.py:1528: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('-', '--rules', 'JJ01', '--format', 'yaml', '--disable-progress-bar', ...)] 1787s kwargs = {'input': 'SELECT {{1}}'}, cli_input = 'SELECT {{1}}' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command_lint_serialize_from_stdin[SELECT {{1}}-JJ01-expected2-1-json] _ 1787s 1787s serialize = 'json', sql = 'SELECT {{1}}', rules = 'JJ01' 1787s expected = [{'filepath': 'stdin', 'statistics': {'raw_segments': 6, 'segments': 11, 'source_chars': 12, 'templated_chars': 8}, 'v...ion': 'Jinja tags should have a single whitespace on either side: {{1}}', 'end_file_pos': 12, 'end_line_no': 1, ...}]}] 1787s exit_code = 1 1787s 1787s @pytest.mark.parametrize("serialize", ["yaml", "json", "none"]) 1787s @pytest.mark.parametrize( 1787s "sql,rules,expected,exit_code", 1787s [ 1787s ( 1787s "select * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # Empty list because no violations. 1787s "violations": [], 1787s } 1787s ], 1787s 0, 1787s ), 1787s ( 1787s "SElect * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "SELECT", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s } 1787s ], 1787s }, 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "FROM", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s # Test serialisation with a source only fix. 1787s ( 1787s "SELECT {{1}}", 1787s "JJ01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "JJ01", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s "description": ( 1787s "Jinja tags should have a single whitespace on " 1787s "either side: {{1}}" 1787s ), 1787s "name": "jinja.padding", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "{{ 1 }}", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 6, 1787s "segments": 11, 1787s "source_chars": 12, 1787s "templated_chars": 8, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_serialize_from_stdin( 1787s serialize, sql, rules, expected, exit_code 1787s ): 1787s """Check an explicit serialized return value for a single error.""" 1787s > result = invoke_assert_code( 1787s args=[ 1787s lint, 1787s ( 1787s "-", 1787s "--rules", 1787s rules, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s "--dialect=ansi", 1787s ), 1787s ], 1787s cli_input=sql, 1787s ret_code=exit_code, 1787s ) 1787s 1787s test/cli/commands_test.py:1528: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('-', '--rules', 'JJ01', '--format', 'json', '--disable-progress-bar', ...)] 1787s kwargs = {'input': 'SELECT {{1}}'}, cli_input = 'SELECT {{1}}' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command_lint_serialize_from_stdin[SELECT {{1}}-JJ01-expected2-1-none] _ 1787s 1787s serialize = 'none', sql = 'SELECT {{1}}', rules = 'JJ01' 1787s expected = [{'filepath': 'stdin', 'statistics': {'raw_segments': 6, 'segments': 11, 'source_chars': 12, 'templated_chars': 8}, 'v...ion': 'Jinja tags should have a single whitespace on either side: {{1}}', 'end_file_pos': 12, 'end_line_no': 1, ...}]}] 1787s exit_code = 1 1787s 1787s @pytest.mark.parametrize("serialize", ["yaml", "json", "none"]) 1787s @pytest.mark.parametrize( 1787s "sql,rules,expected,exit_code", 1787s [ 1787s ( 1787s "select * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # Empty list because no violations. 1787s "violations": [], 1787s } 1787s ], 1787s 0, 1787s ), 1787s ( 1787s "SElect * from tbl", 1787s "CP01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "SELECT", 1787s "start_line_no": 1, 1787s "start_line_pos": 1, 1787s "start_file_pos": 0, 1787s "end_line_no": 1, 1787s "end_line_pos": 7, 1787s "end_file_pos": 6, 1787s } 1787s ], 1787s }, 1787s { 1787s "code": "CP01", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s "description": "Keywords must be consistently upper case.", 1787s "name": "capitalisation.keywords", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "FROM", 1787s "start_line_no": 1, 1787s "start_line_pos": 10, 1787s "start_file_pos": 9, 1787s "end_line_no": 1, 1787s "end_line_pos": 14, 1787s "end_file_pos": 13, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 12, 1787s "segments": 24, 1787s "source_chars": 17, 1787s "templated_chars": 17, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s # Test serialisation with a source only fix. 1787s ( 1787s "SELECT {{1}}", 1787s "JJ01", 1787s [ 1787s { 1787s "filepath": "stdin", 1787s "violations": [ 1787s { 1787s "code": "JJ01", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s "description": ( 1787s "Jinja tags should have a single whitespace on " 1787s "either side: {{1}}" 1787s ), 1787s "name": "jinja.padding", 1787s "warning": False, 1787s "fixes": [ 1787s { 1787s "type": "replace", 1787s "edit": "{{ 1 }}", 1787s "start_line_no": 1, 1787s "start_line_pos": 8, 1787s "start_file_pos": 7, 1787s "end_line_no": 1, 1787s "end_line_pos": 13, 1787s "end_file_pos": 12, 1787s } 1787s ], 1787s }, 1787s ], 1787s "statistics": { 1787s "raw_segments": 6, 1787s "segments": 11, 1787s "source_chars": 12, 1787s "templated_chars": 8, 1787s }, 1787s # NOTE: There will be a timings section too, but we're not 1787s # going to test that. 1787s } 1787s ], 1787s 1, 1787s ), 1787s ], 1787s ) 1787s def test__cli__command_lint_serialize_from_stdin( 1787s serialize, sql, rules, expected, exit_code 1787s ): 1787s """Check an explicit serialized return value for a single error.""" 1787s > result = invoke_assert_code( 1787s args=[ 1787s lint, 1787s ( 1787s "-", 1787s "--rules", 1787s rules, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s "--dialect=ansi", 1787s ), 1787s ], 1787s cli_input=sql, 1787s ret_code=exit_code, 1787s ) 1787s 1787s test/cli/commands_test.py:1528: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('-', '--rules', 'JJ01', '--format', 'none', '--disable-progress-bar', ...)] 1787s kwargs = {'input': 'SELECT {{1}}'}, cli_input = 'SELECT {{1}}' 1787s mix_stderr = True, assert_output_contains = '', raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _______________ test__cli__command_fail_nice_not_found[command0] _______________ 1787s 1787s command = [, 'this_file_does_not_exist.sql'] 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s [lint, ("this_file_does_not_exist.sql")], 1787s [fix, ("this_file_does_not_exist.sql")], 1787s ], 1787s ) 1787s def test__cli__command_fail_nice_not_found(command): 1787s """Check commands fail as expected when then don't find files.""" 1787s > invoke_assert_code( 1787s args=command, 1787s ret_code=2, 1787s assert_output_contains=( 1787s "User Error: Specified path does not exist. Check it/they " 1787s "exist(s): this_file_does_not_exist.sql" 1787s ), 1787s ) 1787s 1787s test/cli/commands_test.py:1574: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 2, args = [, 'this_file_does_not_exist.sql'] 1787s kwargs = {}, cli_input = None, mix_stderr = True 1787s assert_output_contains = 'User Error: Specified path does not exist. Check it/they exist(s): this_file_does_not_exist.sql' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _______________ test__cli__command_fail_nice_not_found[command1] _______________ 1787s 1787s command = [, 'this_file_does_not_exist.sql'] 1787s 1787s @pytest.mark.parametrize( 1787s "command", 1787s [ 1787s [lint, ("this_file_does_not_exist.sql")], 1787s [fix, ("this_file_does_not_exist.sql")], 1787s ], 1787s ) 1787s def test__cli__command_fail_nice_not_found(command): 1787s """Check commands fail as expected when then don't find files.""" 1787s > invoke_assert_code( 1787s args=command, 1787s ret_code=2, 1787s assert_output_contains=( 1787s "User Error: Specified path does not exist. Check it/they " 1787s "exist(s): this_file_does_not_exist.sql" 1787s ), 1787s ) 1787s 1787s test/cli/commands_test.py:1574: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 2, args = [, 'this_file_does_not_exist.sql'] 1787s kwargs = {}, cli_input = None, mix_stderr = True 1787s assert_output_contains = 'User Error: Specified path does not exist. Check it/they exist(s): this_file_does_not_exist.sql' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _________ test__cli__command_lint_serialize_multiple_files[None-human] _________ 1787s 1787s serialize = 'human', write_file = None 1787s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_lint_serial0') 1787s 1787s @pytest.mark.parametrize( 1787s "serialize", 1787s ["human", "yaml", "json", "github-annotation", "github-annotation-native", "none"], 1787s ) 1787s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1787s def test__cli__command_lint_serialize_multiple_files(serialize, write_file, tmp_path): 1787s """Test the output formats for multiple files. 1787s 1787s This tests runs both stdout checking and file checking. 1787s """ 1787s fpath1 = "test/fixtures/linter/indentation_errors.sql" 1787s fpath2 = "test/fixtures/linter/multiple_sql_errors.sql" 1787s 1787s cmd_args = ( 1787s fpath1, 1787s fpath2, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s ) 1787s 1787s if write_file: 1787s ext = { 1787s "human": ".txt", 1787s "yaml": ".yaml", 1787s } 1787s target_file = os.path.join(tmp_path, write_file + ext.get(serialize, ".json")) 1787s cmd_args += ("--write-output", target_file) 1787s 1787s # note the file is in here twice. two files = two payloads. 1787s > result = invoke_assert_code( 1787s args=[lint, cmd_args], 1787s ret_code=1, 1787s ) 1787s 1787s test/cli/commands_test.py:1644: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('test/fixtures/linter/indentation_errors.sql', 'test/fixtures/linter/multiple_sql_errors.sql', '--format', 'human', '--disable-progress-bar')] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _________ test__cli__command_lint_serialize_multiple_files[None-yaml] __________ 1787s 1787s serialize = 'yaml', write_file = None 1787s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_lint_serial1') 1787s 1787s @pytest.mark.parametrize( 1787s "serialize", 1787s ["human", "yaml", "json", "github-annotation", "github-annotation-native", "none"], 1787s ) 1787s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1787s def test__cli__command_lint_serialize_multiple_files(serialize, write_file, tmp_path): 1787s """Test the output formats for multiple files. 1787s 1787s This tests runs both stdout checking and file checking. 1787s """ 1787s fpath1 = "test/fixtures/linter/indentation_errors.sql" 1787s fpath2 = "test/fixtures/linter/multiple_sql_errors.sql" 1787s 1787s cmd_args = ( 1787s fpath1, 1787s fpath2, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s ) 1787s 1787s if write_file: 1787s ext = { 1787s "human": ".txt", 1787s "yaml": ".yaml", 1787s } 1787s target_file = os.path.join(tmp_path, write_file + ext.get(serialize, ".json")) 1787s cmd_args += ("--write-output", target_file) 1787s 1787s # note the file is in here twice. two files = two payloads. 1787s > result = invoke_assert_code( 1787s args=[lint, cmd_args], 1787s ret_code=1, 1787s ) 1787s 1787s test/cli/commands_test.py:1644: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('test/fixtures/linter/indentation_errors.sql', 'test/fixtures/linter/multiple_sql_errors.sql', '--format', 'yaml', '--disable-progress-bar')] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _________ test__cli__command_lint_serialize_multiple_files[None-json] __________ 1787s 1787s serialize = 'json', write_file = None 1787s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_lint_serial2') 1787s 1787s @pytest.mark.parametrize( 1787s "serialize", 1787s ["human", "yaml", "json", "github-annotation", "github-annotation-native", "none"], 1787s ) 1787s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1787s def test__cli__command_lint_serialize_multiple_files(serialize, write_file, tmp_path): 1787s """Test the output formats for multiple files. 1787s 1787s This tests runs both stdout checking and file checking. 1787s """ 1787s fpath1 = "test/fixtures/linter/indentation_errors.sql" 1787s fpath2 = "test/fixtures/linter/multiple_sql_errors.sql" 1787s 1787s cmd_args = ( 1787s fpath1, 1787s fpath2, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s ) 1787s 1787s if write_file: 1787s ext = { 1787s "human": ".txt", 1787s "yaml": ".yaml", 1787s } 1787s target_file = os.path.join(tmp_path, write_file + ext.get(serialize, ".json")) 1787s cmd_args += ("--write-output", target_file) 1787s 1787s # note the file is in here twice. two files = two payloads. 1787s > result = invoke_assert_code( 1787s args=[lint, cmd_args], 1787s ret_code=1, 1787s ) 1787s 1787s test/cli/commands_test.py:1644: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('test/fixtures/linter/indentation_errors.sql', 'test/fixtures/linter/multiple_sql_errors.sql', '--format', 'json', '--disable-progress-bar')] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ___ test__cli__command_lint_serialize_multiple_files[None-github-annotation] ___ 1787s 1787s serialize = 'github-annotation', write_file = None 1787s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_lint_serial3') 1787s 1787s @pytest.mark.parametrize( 1787s "serialize", 1787s ["human", "yaml", "json", "github-annotation", "github-annotation-native", "none"], 1787s ) 1787s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1787s def test__cli__command_lint_serialize_multiple_files(serialize, write_file, tmp_path): 1787s """Test the output formats for multiple files. 1787s 1787s This tests runs both stdout checking and file checking. 1787s """ 1787s fpath1 = "test/fixtures/linter/indentation_errors.sql" 1787s fpath2 = "test/fixtures/linter/multiple_sql_errors.sql" 1787s 1787s cmd_args = ( 1787s fpath1, 1787s fpath2, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s ) 1787s 1787s if write_file: 1787s ext = { 1787s "human": ".txt", 1787s "yaml": ".yaml", 1787s } 1787s target_file = os.path.join(tmp_path, write_file + ext.get(serialize, ".json")) 1787s cmd_args += ("--write-output", target_file) 1787s 1787s # note the file is in here twice. two files = two payloads. 1787s > result = invoke_assert_code( 1787s args=[lint, cmd_args], 1787s ret_code=1, 1787s ) 1787s 1787s test/cli/commands_test.py:1644: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('test/fixtures/linter/indentation_errors.sql', 'test/fixtures/linter/multiple_sql_errors.sql', '--format', 'github-annotation', '--disable-progress-bar')] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command_lint_serialize_multiple_files[None-github-annotation-native] _ 1787s 1787s serialize = 'github-annotation-native', write_file = None 1787s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_lint_serial4') 1787s 1787s @pytest.mark.parametrize( 1787s "serialize", 1787s ["human", "yaml", "json", "github-annotation", "github-annotation-native", "none"], 1787s ) 1787s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1787s def test__cli__command_lint_serialize_multiple_files(serialize, write_file, tmp_path): 1787s """Test the output formats for multiple files. 1787s 1787s This tests runs both stdout checking and file checking. 1787s """ 1787s fpath1 = "test/fixtures/linter/indentation_errors.sql" 1787s fpath2 = "test/fixtures/linter/multiple_sql_errors.sql" 1787s 1787s cmd_args = ( 1787s fpath1, 1787s fpath2, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s ) 1787s 1787s if write_file: 1787s ext = { 1787s "human": ".txt", 1787s "yaml": ".yaml", 1787s } 1787s target_file = os.path.join(tmp_path, write_file + ext.get(serialize, ".json")) 1787s cmd_args += ("--write-output", target_file) 1787s 1787s # note the file is in here twice. two files = two payloads. 1787s > result = invoke_assert_code( 1787s args=[lint, cmd_args], 1787s ret_code=1, 1787s ) 1787s 1787s test/cli/commands_test.py:1644: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('test/fixtures/linter/indentation_errors.sql', 'test/fixtures/linter/multiple_sql_errors.sql', '--format', 'github-annotation-native', '--disable-progress-bar')] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _________ test__cli__command_lint_serialize_multiple_files[None-none] __________ 1787s 1787s serialize = 'none', write_file = None 1787s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_lint_serial5') 1787s 1787s @pytest.mark.parametrize( 1787s "serialize", 1787s ["human", "yaml", "json", "github-annotation", "github-annotation-native", "none"], 1787s ) 1787s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1787s def test__cli__command_lint_serialize_multiple_files(serialize, write_file, tmp_path): 1787s """Test the output formats for multiple files. 1787s 1787s This tests runs both stdout checking and file checking. 1787s """ 1787s fpath1 = "test/fixtures/linter/indentation_errors.sql" 1787s fpath2 = "test/fixtures/linter/multiple_sql_errors.sql" 1787s 1787s cmd_args = ( 1787s fpath1, 1787s fpath2, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s ) 1787s 1787s if write_file: 1787s ext = { 1787s "human": ".txt", 1787s "yaml": ".yaml", 1787s } 1787s target_file = os.path.join(tmp_path, write_file + ext.get(serialize, ".json")) 1787s cmd_args += ("--write-output", target_file) 1787s 1787s # note the file is in here twice. two files = two payloads. 1787s > result = invoke_assert_code( 1787s args=[lint, cmd_args], 1787s ret_code=1, 1787s ) 1787s 1787s test/cli/commands_test.py:1644: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('test/fixtures/linter/indentation_errors.sql', 'test/fixtures/linter/multiple_sql_errors.sql', '--format', 'none', '--disable-progress-bar')] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _______ test__cli__command_lint_serialize_multiple_files[outfile-human] ________ 1787s 1787s serialize = 'human', write_file = 'outfile' 1787s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_lint_serial6') 1787s 1787s @pytest.mark.parametrize( 1787s "serialize", 1787s ["human", "yaml", "json", "github-annotation", "github-annotation-native", "none"], 1787s ) 1787s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1787s def test__cli__command_lint_serialize_multiple_files(serialize, write_file, tmp_path): 1787s """Test the output formats for multiple files. 1787s 1787s This tests runs both stdout checking and file checking. 1787s """ 1787s fpath1 = "test/fixtures/linter/indentation_errors.sql" 1787s fpath2 = "test/fixtures/linter/multiple_sql_errors.sql" 1787s 1787s cmd_args = ( 1787s fpath1, 1787s fpath2, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s ) 1787s 1787s if write_file: 1787s ext = { 1787s "human": ".txt", 1787s "yaml": ".yaml", 1787s } 1787s target_file = os.path.join(tmp_path, write_file + ext.get(serialize, ".json")) 1787s cmd_args += ("--write-output", target_file) 1787s 1787s # note the file is in here twice. two files = two payloads. 1787s > result = invoke_assert_code( 1787s args=[lint, cmd_args], 1787s ret_code=1, 1787s ) 1787s 1787s test/cli/commands_test.py:1644: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('test/fixtures/linter/indentation_errors.sql', 'test/fixtures/linter/multiple_sql_errors.sql', '--format', 'human', '--disable-progress-bar', '--write-output', ...)] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ________ test__cli__command_lint_serialize_multiple_files[outfile-yaml] ________ 1787s 1787s serialize = 'yaml', write_file = 'outfile' 1787s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_lint_serial7') 1787s 1787s @pytest.mark.parametrize( 1787s "serialize", 1787s ["human", "yaml", "json", "github-annotation", "github-annotation-native", "none"], 1787s ) 1787s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1787s def test__cli__command_lint_serialize_multiple_files(serialize, write_file, tmp_path): 1787s """Test the output formats for multiple files. 1787s 1787s This tests runs both stdout checking and file checking. 1787s """ 1787s fpath1 = "test/fixtures/linter/indentation_errors.sql" 1787s fpath2 = "test/fixtures/linter/multiple_sql_errors.sql" 1787s 1787s cmd_args = ( 1787s fpath1, 1787s fpath2, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s ) 1787s 1787s if write_file: 1787s ext = { 1787s "human": ".txt", 1787s "yaml": ".yaml", 1787s } 1787s target_file = os.path.join(tmp_path, write_file + ext.get(serialize, ".json")) 1787s cmd_args += ("--write-output", target_file) 1787s 1787s # note the file is in here twice. two files = two payloads. 1787s > result = invoke_assert_code( 1787s args=[lint, cmd_args], 1787s ret_code=1, 1787s ) 1787s 1787s test/cli/commands_test.py:1644: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('test/fixtures/linter/indentation_errors.sql', 'test/fixtures/linter/multiple_sql_errors.sql', '--format', 'yaml', '--disable-progress-bar', '--write-output', ...)] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s ________ test__cli__command_lint_serialize_multiple_files[outfile-json] ________ 1787s 1787s serialize = 'json', write_file = 'outfile' 1787s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_lint_serial8') 1787s 1787s @pytest.mark.parametrize( 1787s "serialize", 1787s ["human", "yaml", "json", "github-annotation", "github-annotation-native", "none"], 1787s ) 1787s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1787s def test__cli__command_lint_serialize_multiple_files(serialize, write_file, tmp_path): 1787s """Test the output formats for multiple files. 1787s 1787s This tests runs both stdout checking and file checking. 1787s """ 1787s fpath1 = "test/fixtures/linter/indentation_errors.sql" 1787s fpath2 = "test/fixtures/linter/multiple_sql_errors.sql" 1787s 1787s cmd_args = ( 1787s fpath1, 1787s fpath2, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s ) 1787s 1787s if write_file: 1787s ext = { 1787s "human": ".txt", 1787s "yaml": ".yaml", 1787s } 1787s target_file = os.path.join(tmp_path, write_file + ext.get(serialize, ".json")) 1787s cmd_args += ("--write-output", target_file) 1787s 1787s # note the file is in here twice. two files = two payloads. 1787s > result = invoke_assert_code( 1787s args=[lint, cmd_args], 1787s ret_code=1, 1787s ) 1787s 1787s test/cli/commands_test.py:1644: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('test/fixtures/linter/indentation_errors.sql', 'test/fixtures/linter/multiple_sql_errors.sql', '--format', 'json', '--disable-progress-bar', '--write-output', ...)] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1787s raise_exceptions: bool = True, 1787s ) -> Result: 1787s """Invoke a command and check return code.""" 1787s args = args or [] 1787s kwargs = kwargs or {} 1787s if cli_input: 1787s kwargs["input"] = cli_input 1787s > runner = CliRunner(mix_stderr=mix_stderr) 1787s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1787s 1787s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1787s _ test__cli__command_lint_serialize_multiple_files[outfile-github-annotation] __ 1787s 1787s serialize = 'github-annotation', write_file = 'outfile' 1787s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_lint_serial9') 1787s 1787s @pytest.mark.parametrize( 1787s "serialize", 1787s ["human", "yaml", "json", "github-annotation", "github-annotation-native", "none"], 1787s ) 1787s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1787s def test__cli__command_lint_serialize_multiple_files(serialize, write_file, tmp_path): 1787s """Test the output formats for multiple files. 1787s 1787s This tests runs both stdout checking and file checking. 1787s """ 1787s fpath1 = "test/fixtures/linter/indentation_errors.sql" 1787s fpath2 = "test/fixtures/linter/multiple_sql_errors.sql" 1787s 1787s cmd_args = ( 1787s fpath1, 1787s fpath2, 1787s "--format", 1787s serialize, 1787s "--disable-progress-bar", 1787s ) 1787s 1787s if write_file: 1787s ext = { 1787s "human": ".txt", 1787s "yaml": ".yaml", 1787s } 1787s target_file = os.path.join(tmp_path, write_file + ext.get(serialize, ".json")) 1787s cmd_args += ("--write-output", target_file) 1787s 1787s # note the file is in here twice. two files = two payloads. 1787s > result = invoke_assert_code( 1787s args=[lint, cmd_args], 1787s ret_code=1, 1787s ) 1787s 1787s test/cli/commands_test.py:1644: 1787s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1787s 1787s ret_code = 1 1787s args = [, ('test/fixtures/linter/indentation_errors.sql', 'test/fixtures/linter/multiple_sql_errors.sql', '--format', 'github-annotation', '--disable-progress-bar', '--write-output', ...)] 1787s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1787s raise_exceptions = True 1787s 1787s def invoke_assert_code( 1787s ret_code: int = 0, 1787s args: Optional[List[Any]] = None, 1787s kwargs: Optional[Dict[str, Any]] = None, 1787s cli_input: Optional[str] = None, 1787s mix_stderr: bool = True, 1787s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s _ test__cli__command_lint_serialize_multiple_files[outfile-github-annotation-native] _ 1788s 1788s serialize = 'github-annotation-native', write_file = 'outfile' 1788s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_lint_serial10') 1788s 1788s @pytest.mark.parametrize( 1788s "serialize", 1788s ["human", "yaml", "json", "github-annotation", "github-annotation-native", "none"], 1788s ) 1788s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1788s def test__cli__command_lint_serialize_multiple_files(serialize, write_file, tmp_path): 1788s """Test the output formats for multiple files. 1788s 1788s This tests runs both stdout checking and file checking. 1788s """ 1788s fpath1 = "test/fixtures/linter/indentation_errors.sql" 1788s fpath2 = "test/fixtures/linter/multiple_sql_errors.sql" 1788s 1788s cmd_args = ( 1788s fpath1, 1788s fpath2, 1788s "--format", 1788s serialize, 1788s "--disable-progress-bar", 1788s ) 1788s 1788s if write_file: 1788s ext = { 1788s "human": ".txt", 1788s "yaml": ".yaml", 1788s } 1788s target_file = os.path.join(tmp_path, write_file + ext.get(serialize, ".json")) 1788s cmd_args += ("--write-output", target_file) 1788s 1788s # note the file is in here twice. two files = two payloads. 1788s > result = invoke_assert_code( 1788s args=[lint, cmd_args], 1788s ret_code=1, 1788s ) 1788s 1788s test/cli/commands_test.py:1644: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ('test/fixtures/linter/indentation_errors.sql', 'test/fixtures/linter/multiple_sql_errors.sql', '--format', 'github-annotation-native', '--disable-progress-bar', '--write-output', ...)] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s ________ test__cli__command_lint_serialize_multiple_files[outfile-none] ________ 1788s 1788s serialize = 'none', write_file = 'outfile' 1788s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test__cli__command_lint_serial11') 1788s 1788s @pytest.mark.parametrize( 1788s "serialize", 1788s ["human", "yaml", "json", "github-annotation", "github-annotation-native", "none"], 1788s ) 1788s @pytest.mark.parametrize("write_file", [None, "outfile"]) 1788s def test__cli__command_lint_serialize_multiple_files(serialize, write_file, tmp_path): 1788s """Test the output formats for multiple files. 1788s 1788s This tests runs both stdout checking and file checking. 1788s """ 1788s fpath1 = "test/fixtures/linter/indentation_errors.sql" 1788s fpath2 = "test/fixtures/linter/multiple_sql_errors.sql" 1788s 1788s cmd_args = ( 1788s fpath1, 1788s fpath2, 1788s "--format", 1788s serialize, 1788s "--disable-progress-bar", 1788s ) 1788s 1788s if write_file: 1788s ext = { 1788s "human": ".txt", 1788s "yaml": ".yaml", 1788s } 1788s target_file = os.path.join(tmp_path, write_file + ext.get(serialize, ".json")) 1788s cmd_args += ("--write-output", target_file) 1788s 1788s # note the file is in here twice. two files = two payloads. 1788s > result = invoke_assert_code( 1788s args=[lint, cmd_args], 1788s ret_code=1, 1788s ) 1788s 1788s test/cli/commands_test.py:1644: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ('test/fixtures/linter/indentation_errors.sql', 'test/fixtures/linter/multiple_sql_errors.sql', '--format', 'none', '--disable-progress-bar', '--write-output', ...)] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s _____________ test__cli__command_lint_serialize_github_annotation ______________ 1788s 1788s def test__cli__command_lint_serialize_github_annotation(): 1788s """Test format of github-annotation output.""" 1788s fpath = "test/fixtures/linter/identifier_capitalisation.sql" 1788s > result = invoke_assert_code( 1788s args=[ 1788s lint, 1788s ( 1788s fpath, 1788s "--format", 1788s "github-annotation", 1788s "--annotation-level", 1788s "warning", 1788s "--disable-progress-bar", 1788s ), 1788s ], 1788s ret_code=1, 1788s ) 1788s 1788s test/cli/commands_test.py:1690: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ('test/fixtures/linter/identifier_capitalisation.sql', '--format', 'github-annotation', '--annotation-level', 'warning', '--disable-progress-bar')] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s _ test__cli__command_lint_serialize_github_annotation_native[test/fixtures/linter/identifier_capitalisation.sql-::group::{filename}\n::error title=SQLFluff,file={filename},line=3,col=5,endLine=3,endColumn=8::RF02: Unqualified reference 'foo' found in select with more than one referenced table/view. [references.qualification]\n::error title=SQLFluff,file={filename},line=4,col=1,endLine=4,endColumn=5::LT02: Expected indent of 8 spaces. [layout.indent]\n::error title=SQLFluff,file={filename},line=4,col=5,endLine=4,endColumn=8::AL02: Implicit/explicit aliasing of columns. [aliasing.column]\n::error title=SQLFluff,file={filename},line=4,col=5,endLine=4,endColumn=8::CP02: Unquoted identifiers must be consistently lower case. [capitalisation.identifiers]\n::notice title=SQLFluff,file={filename},line=5,col=1,endLine=5,endColumn=5::CP01: Keywords must be consistently lower case. [capitalisation.keywords]\n::error title=SQLFluff,file={filename},line=5,col=12,endLine=5,endColumn=16::CP02: Unquoted identifiers must be consistently lower case. [capitalisation.identifiers]\n::error title=SQLFluff,file={filename},line=5,col=18,endLine=5,endColumn=22::CP02: Unquoted identifiers must be consistently lower case. [capitalisation.identifiers]\n::endgroup::\n] _ 1788s 1788s filename = 'test/fixtures/linter/identifier_capitalisation.sql' 1788s expected_output = '::group::{filename}\n::error title=SQLFluff,file={filename},line=3,col=5,endLine=3,endColumn=8::RF02: Unqualified ref...endColumn=22::CP02: Unquoted identifiers must be consistently lower case. [capitalisation.identifiers]\n::endgroup::\n' 1788s 1788s @pytest.mark.parametrize( 1788s "filename,expected_output", 1788s [ 1788s ( 1788s "test/fixtures/linter/identifier_capitalisation.sql", 1788s ( 1788s "::group::{filename}\n" 1788s "::error title=SQLFluff,file={filename}," 1788s "line=3,col=5,endLine=3,endColumn=8::" 1788s "RF02: Unqualified reference 'foo' found in select with more than one " 1788s "referenced table/view. [references.qualification]\n" 1788s "::error title=SQLFluff,file={filename}," 1788s "line=4,col=1,endLine=4,endColumn=5::" 1788s "LT02: Expected indent of 8 spaces. [layout.indent]\n" 1788s "::error title=SQLFluff,file={filename}," 1788s "line=4,col=5,endLine=4,endColumn=8::" 1788s "AL02: Implicit/explicit aliasing of columns. [aliasing.column]\n" 1788s "::error title=SQLFluff,file={filename}," 1788s "line=4,col=5,endLine=4,endColumn=8::" 1788s "CP02: Unquoted identifiers must be consistently lower case. " 1788s "[capitalisation.identifiers]\n" 1788s # Warnings should always come through as notices. 1788s "::notice title=SQLFluff,file={filename}," 1788s "line=5,col=1,endLine=5,endColumn=5::" 1788s "CP01: Keywords must be consistently lower case. " 1788s "[capitalisation.keywords]\n" 1788s "::error title=SQLFluff,file={filename}," 1788s "line=5,col=12,endLine=5,endColumn=16::" 1788s "CP02: Unquoted identifiers must be consistently lower case. " 1788s "[capitalisation.identifiers]\n" 1788s "::error title=SQLFluff,file={filename}," 1788s "line=5,col=18,endLine=5,endColumn=22::" 1788s "CP02: Unquoted identifiers must be consistently lower case. " 1788s "[capitalisation.identifiers]\n" 1788s "::endgroup::\n" 1788s # SQLFluff produces trailing newline 1788s ), 1788s ), 1788s ( 1788s "test/fixtures/linter/jinja_spacing.sql", 1788s ( 1788s "::group::{filename}\n" 1788s "::error title=SQLFluff,file={filename}," 1788s "line=3,col=15,endLine=3,endColumn=22::JJ01: " 1788s "Jinja tags should have a single whitespace on either " 1788s # NOTE: Double escaping, because we're going to pass this through a 1788s # .format() method. 1788s "side: {{{{foo}}}} " 1788s "[jinja.padding]\n" 1788s "::endgroup::\n" 1788s ), 1788s ), 1788s ], 1788s ) 1788s def test__cli__command_lint_serialize_github_annotation_native( 1788s filename, expected_output 1788s ): 1788s """Test format of github-annotation output.""" 1788s # Normalise paths to control for OS variance 1788s fpath_normalised = os.path.normpath(filename) 1788s 1788s > result = invoke_assert_code( 1788s args=[ 1788s lint, 1788s ( 1788s filename, 1788s "--format", 1788s "github-annotation-native", 1788s "--annotation-level", 1788s "error", 1788s "--disable-progress-bar", 1788s ), 1788s ], 1788s ret_code=1, 1788s ) 1788s 1788s test/cli/commands_test.py:1863: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ('test/fixtures/linter/identifier_capitalisation.sql', '--format', 'github-annotation-native', '--annotation-level', 'error', '--disable-progress-bar')] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s _ test__cli__command_lint_serialize_github_annotation_native[test/fixtures/linter/jinja_spacing.sql-::group::{filename}\n::error title=SQLFluff,file={filename},line=3,col=15,endLine=3,endColumn=22::JJ01: Jinja tags should have a single whitespace on either side: {{{{foo}}}} [jinja.padding]\n::endgroup::\n] _ 1788s 1788s filename = 'test/fixtures/linter/jinja_spacing.sql' 1788s expected_output = '::group::{filename}\n::error title=SQLFluff,file={filename},line=3,col=15,endLine=3,endColumn=22::JJ01: Jinja tags should have a single whitespace on either side: {{{{foo}}}} [jinja.padding]\n::endgroup::\n' 1788s 1788s @pytest.mark.parametrize( 1788s "filename,expected_output", 1788s [ 1788s ( 1788s "test/fixtures/linter/identifier_capitalisation.sql", 1788s ( 1788s "::group::{filename}\n" 1788s "::error title=SQLFluff,file={filename}," 1788s "line=3,col=5,endLine=3,endColumn=8::" 1788s "RF02: Unqualified reference 'foo' found in select with more than one " 1788s "referenced table/view. [references.qualification]\n" 1788s "::error title=SQLFluff,file={filename}," 1788s "line=4,col=1,endLine=4,endColumn=5::" 1788s "LT02: Expected indent of 8 spaces. [layout.indent]\n" 1788s "::error title=SQLFluff,file={filename}," 1788s "line=4,col=5,endLine=4,endColumn=8::" 1788s "AL02: Implicit/explicit aliasing of columns. [aliasing.column]\n" 1788s "::error title=SQLFluff,file={filename}," 1788s "line=4,col=5,endLine=4,endColumn=8::" 1788s "CP02: Unquoted identifiers must be consistently lower case. " 1788s "[capitalisation.identifiers]\n" 1788s # Warnings should always come through as notices. 1788s "::notice title=SQLFluff,file={filename}," 1788s "line=5,col=1,endLine=5,endColumn=5::" 1788s "CP01: Keywords must be consistently lower case. " 1788s "[capitalisation.keywords]\n" 1788s "::error title=SQLFluff,file={filename}," 1788s "line=5,col=12,endLine=5,endColumn=16::" 1788s "CP02: Unquoted identifiers must be consistently lower case. " 1788s "[capitalisation.identifiers]\n" 1788s "::error title=SQLFluff,file={filename}," 1788s "line=5,col=18,endLine=5,endColumn=22::" 1788s "CP02: Unquoted identifiers must be consistently lower case. " 1788s "[capitalisation.identifiers]\n" 1788s "::endgroup::\n" 1788s # SQLFluff produces trailing newline 1788s ), 1788s ), 1788s ( 1788s "test/fixtures/linter/jinja_spacing.sql", 1788s ( 1788s "::group::{filename}\n" 1788s "::error title=SQLFluff,file={filename}," 1788s "line=3,col=15,endLine=3,endColumn=22::JJ01: " 1788s "Jinja tags should have a single whitespace on either " 1788s # NOTE: Double escaping, because we're going to pass this through a 1788s # .format() method. 1788s "side: {{{{foo}}}} " 1788s "[jinja.padding]\n" 1788s "::endgroup::\n" 1788s ), 1788s ), 1788s ], 1788s ) 1788s def test__cli__command_lint_serialize_github_annotation_native( 1788s filename, expected_output 1788s ): 1788s """Test format of github-annotation output.""" 1788s # Normalise paths to control for OS variance 1788s fpath_normalised = os.path.normpath(filename) 1788s 1788s > result = invoke_assert_code( 1788s args=[ 1788s lint, 1788s ( 1788s filename, 1788s "--format", 1788s "github-annotation-native", 1788s "--annotation-level", 1788s "error", 1788s "--disable-progress-bar", 1788s ), 1788s ], 1788s ret_code=1, 1788s ) 1788s 1788s test/cli/commands_test.py:1863: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ('test/fixtures/linter/jinja_spacing.sql', '--format', 'github-annotation-native', '--annotation-level', 'error', '--disable-progress-bar')] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s _ test__cli__command_lint_serialize_annotation_level_error_failure_equivalent[github-annotation] _ 1788s 1788s serialize = 'github-annotation' 1788s 1788s @pytest.mark.parametrize("serialize", ["github-annotation", "github-annotation-native"]) 1788s def test__cli__command_lint_serialize_annotation_level_error_failure_equivalent( 1788s serialize, 1788s ): 1788s """Test format of github-annotation output.""" 1788s fpath = "test/fixtures/linter/identifier_capitalisation.sql" 1788s > result_error = invoke_assert_code( 1788s args=[ 1788s lint, 1788s ( 1788s fpath, 1788s "--format", 1788s serialize, 1788s "--annotation-level", 1788s "error", 1788s "--disable-progress-bar", 1788s ), 1788s ], 1788s ret_code=1, 1788s ) 1788s 1788s test/cli/commands_test.py:1886: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ('test/fixtures/linter/identifier_capitalisation.sql', '--format', 'github-annotation', '--annotation-level', 'error', '--disable-progress-bar')] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s _ test__cli__command_lint_serialize_annotation_level_error_failure_equivalent[github-annotation-native] _ 1788s 1788s serialize = 'github-annotation-native' 1788s 1788s @pytest.mark.parametrize("serialize", ["github-annotation", "github-annotation-native"]) 1788s def test__cli__command_lint_serialize_annotation_level_error_failure_equivalent( 1788s serialize, 1788s ): 1788s """Test format of github-annotation output.""" 1788s fpath = "test/fixtures/linter/identifier_capitalisation.sql" 1788s > result_error = invoke_assert_code( 1788s args=[ 1788s lint, 1788s ( 1788s fpath, 1788s "--format", 1788s serialize, 1788s "--annotation-level", 1788s "error", 1788s "--disable-progress-bar", 1788s ), 1788s ], 1788s ret_code=1, 1788s ) 1788s 1788s test/cli/commands_test.py:1886: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ('test/fixtures/linter/identifier_capitalisation.sql', '--format', 'github-annotation-native', '--annotation-level', 'error', '--disable-progress-bar')] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s __________________________ test_encoding[utf-8-ascii] __________________________ 1788s 1788s encoding_in = 'utf-8', encoding_out = 'ascii' 1788s 1788s @pytest.mark.parametrize( 1788s "encoding_in,encoding_out", 1788s [ 1788s ("utf-8", "ascii"), # chardet will detect ascii as a subset of utf-8 1788s ("utf-8-sig", "UTF-8-SIG"), 1788s ("utf-32", "UTF-32"), 1788s ], 1788s ) 1788s def test_encoding(encoding_in, encoding_out): 1788s """Check the encoding of the test file remains the same after fix is applied.""" 1788s with open("test/fixtures/linter/indentation_errors.sql", "r") as testfile: 1788s > generic_roundtrip_test( 1788s testfile, 1788s "LT01", 1788s input_file_encoding=encoding_in, 1788s output_file_encoding=encoding_out, 1788s ) 1788s 1788s test/cli/commands_test.py:1938: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s test/cli/commands_test.py:928: in generic_roundtrip_test 1788s invoke_assert_code( 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ['--dialect=ansi', '--rules', 'LT01', '/tmp/tmpx5tnbybe/testing.sql']] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s ______________________ test_encoding[utf-8-sig-UTF-8-SIG] ______________________ 1788s 1788s encoding_in = 'utf-8-sig', encoding_out = 'UTF-8-SIG' 1788s 1788s @pytest.mark.parametrize( 1788s "encoding_in,encoding_out", 1788s [ 1788s ("utf-8", "ascii"), # chardet will detect ascii as a subset of utf-8 1788s ("utf-8-sig", "UTF-8-SIG"), 1788s ("utf-32", "UTF-32"), 1788s ], 1788s ) 1788s def test_encoding(encoding_in, encoding_out): 1788s """Check the encoding of the test file remains the same after fix is applied.""" 1788s with open("test/fixtures/linter/indentation_errors.sql", "r") as testfile: 1788s > generic_roundtrip_test( 1788s testfile, 1788s "LT01", 1788s input_file_encoding=encoding_in, 1788s output_file_encoding=encoding_out, 1788s ) 1788s 1788s test/cli/commands_test.py:1938: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s test/cli/commands_test.py:928: in generic_roundtrip_test 1788s invoke_assert_code( 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ['--dialect=ansi', '--rules', 'LT01', '/tmp/tmp0xs09y9q/testing.sql']] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s _________________________ test_encoding[utf-32-UTF-32] _________________________ 1788s 1788s encoding_in = 'utf-32', encoding_out = 'UTF-32' 1788s 1788s @pytest.mark.parametrize( 1788s "encoding_in,encoding_out", 1788s [ 1788s ("utf-8", "ascii"), # chardet will detect ascii as a subset of utf-8 1788s ("utf-8-sig", "UTF-8-SIG"), 1788s ("utf-32", "UTF-32"), 1788s ], 1788s ) 1788s def test_encoding(encoding_in, encoding_out): 1788s """Check the encoding of the test file remains the same after fix is applied.""" 1788s with open("test/fixtures/linter/indentation_errors.sql", "r") as testfile: 1788s > generic_roundtrip_test( 1788s testfile, 1788s "LT01", 1788s input_file_encoding=encoding_in, 1788s output_file_encoding=encoding_out, 1788s ) 1788s 1788s test/cli/commands_test.py:1938: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s test/cli/commands_test.py:928: in generic_roundtrip_test 1788s invoke_assert_code( 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ['--dialect=ansi', '--rules', 'LT01', '/tmp/tmp52oevgov/testing.sql']] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s _________________ test_cli_encoding[utf-8-command-line-False] __________________ 1788s 1788s encoding = 'utf-8', method = 'command-line', expect_success = False 1788s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_cli_encoding_utf_8_comman0') 1788s 1788s @pytest.mark.parametrize( 1788s "encoding,method,expect_success", 1788s [ 1788s ("utf-8", "command-line", False), 1788s ("utf-8-SIG", "command-line", True), 1788s ("utf-8", "config-file", False), 1788s ("utf-8-SIG", "config-file", True), 1788s ], 1788s ) 1788s def test_cli_encoding(encoding, method, expect_success, tmpdir): 1788s """Try loading a utf-8-SIG encoded file using the correct encoding via the cli.""" 1788s sql_path = "test/fixtures/cli/encoding_test.sql" 1788s if method == "command-line": 1788s options = [sql_path, "--encoding", encoding] 1788s else: 1788s assert method == "config-file" 1788s with open(str(tmpdir / ".sqlfluff"), "w") as f: 1788s print(f"[sqlfluff]\ndialect=ansi\nencoding = {encoding}", file=f) 1788s shutil.copy(sql_path, tmpdir) 1788s options = [str(tmpdir / "encoding_test.sql")] 1788s > result = invoke_assert_code( 1788s ret_code=1, 1788s args=[ 1788s lint, 1788s options, 1788s ], 1788s ) 1788s 1788s test/cli/commands_test.py:1966: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ['test/fixtures/cli/encoding_test.sql', '--encoding', 'utf-8']] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s ________________ test_cli_encoding[utf-8-SIG-command-line-True] ________________ 1788s 1788s encoding = 'utf-8-SIG', method = 'command-line', expect_success = True 1788s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_cli_encoding_utf_8_SIG_co0') 1788s 1788s @pytest.mark.parametrize( 1788s "encoding,method,expect_success", 1788s [ 1788s ("utf-8", "command-line", False), 1788s ("utf-8-SIG", "command-line", True), 1788s ("utf-8", "config-file", False), 1788s ("utf-8-SIG", "config-file", True), 1788s ], 1788s ) 1788s def test_cli_encoding(encoding, method, expect_success, tmpdir): 1788s """Try loading a utf-8-SIG encoded file using the correct encoding via the cli.""" 1788s sql_path = "test/fixtures/cli/encoding_test.sql" 1788s if method == "command-line": 1788s options = [sql_path, "--encoding", encoding] 1788s else: 1788s assert method == "config-file" 1788s with open(str(tmpdir / ".sqlfluff"), "w") as f: 1788s print(f"[sqlfluff]\ndialect=ansi\nencoding = {encoding}", file=f) 1788s shutil.copy(sql_path, tmpdir) 1788s options = [str(tmpdir / "encoding_test.sql")] 1788s > result = invoke_assert_code( 1788s ret_code=1, 1788s args=[ 1788s lint, 1788s options, 1788s ], 1788s ) 1788s 1788s test/cli/commands_test.py:1966: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ['test/fixtures/cli/encoding_test.sql', '--encoding', 'utf-8-SIG']] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s __________________ test_cli_encoding[utf-8-config-file-False] __________________ 1788s 1788s encoding = 'utf-8', method = 'config-file', expect_success = False 1788s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_cli_encoding_utf_8_config0') 1788s 1788s @pytest.mark.parametrize( 1788s "encoding,method,expect_success", 1788s [ 1788s ("utf-8", "command-line", False), 1788s ("utf-8-SIG", "command-line", True), 1788s ("utf-8", "config-file", False), 1788s ("utf-8-SIG", "config-file", True), 1788s ], 1788s ) 1788s def test_cli_encoding(encoding, method, expect_success, tmpdir): 1788s """Try loading a utf-8-SIG encoded file using the correct encoding via the cli.""" 1788s sql_path = "test/fixtures/cli/encoding_test.sql" 1788s if method == "command-line": 1788s options = [sql_path, "--encoding", encoding] 1788s else: 1788s assert method == "config-file" 1788s with open(str(tmpdir / ".sqlfluff"), "w") as f: 1788s print(f"[sqlfluff]\ndialect=ansi\nencoding = {encoding}", file=f) 1788s shutil.copy(sql_path, tmpdir) 1788s options = [str(tmpdir / "encoding_test.sql")] 1788s > result = invoke_assert_code( 1788s ret_code=1, 1788s args=[ 1788s lint, 1788s options, 1788s ], 1788s ) 1788s 1788s test/cli/commands_test.py:1966: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ['/tmp/pytest-of-ubuntu/pytest-0/test_cli_encoding_utf_8_config0/encoding_test.sql']] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s ________________ test_cli_encoding[utf-8-SIG-config-file-True] _________________ 1788s 1788s encoding = 'utf-8-SIG', method = 'config-file', expect_success = True 1788s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_cli_encoding_utf_8_SIG_co1') 1788s 1788s @pytest.mark.parametrize( 1788s "encoding,method,expect_success", 1788s [ 1788s ("utf-8", "command-line", False), 1788s ("utf-8-SIG", "command-line", True), 1788s ("utf-8", "config-file", False), 1788s ("utf-8-SIG", "config-file", True), 1788s ], 1788s ) 1788s def test_cli_encoding(encoding, method, expect_success, tmpdir): 1788s """Try loading a utf-8-SIG encoded file using the correct encoding via the cli.""" 1788s sql_path = "test/fixtures/cli/encoding_test.sql" 1788s if method == "command-line": 1788s options = [sql_path, "--encoding", encoding] 1788s else: 1788s assert method == "config-file" 1788s with open(str(tmpdir / ".sqlfluff"), "w") as f: 1788s print(f"[sqlfluff]\ndialect=ansi\nencoding = {encoding}", file=f) 1788s shutil.copy(sql_path, tmpdir) 1788s options = [str(tmpdir / "encoding_test.sql")] 1788s > result = invoke_assert_code( 1788s ret_code=1, 1788s args=[ 1788s lint, 1788s options, 1788s ], 1788s ) 1788s 1788s test/cli/commands_test.py:1966: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ['/tmp/pytest-of-ubuntu/pytest-0/test_cli_encoding_utf_8_SIG_co1/encoding_test.sql']] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s ________________________ test_cli_no_disable_noqa_flag _________________________ 1788s 1788s def test_cli_no_disable_noqa_flag(): 1788s """Test that unset --disable-noqa flag respects inline noqa comments.""" 1788s > invoke_assert_code( 1788s ret_code=0, 1788s args=[ 1788s lint, 1788s ["test/fixtures/cli/disable_noqa_test.sql"], 1788s ], 1788s ) 1788s 1788s test/cli/commands_test.py:1984: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 0 1788s args = [, ['test/fixtures/cli/disable_noqa_test.sql']] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s __________________________ test_cli_disable_noqa_flag __________________________ 1788s 1788s def test_cli_disable_noqa_flag(): 1788s """Test that --disable-noqa flag ignores inline noqa comments.""" 1788s > invoke_assert_code( 1788s ret_code=1, 1788s args=[ 1788s lint, 1788s [ 1788s "test/fixtures/cli/disable_noqa_test.sql", 1788s "--disable-noqa", 1788s ], 1788s ], 1788s # Linting error is raised even though it is inline ignored. 1788s assert_output_contains=r"L: 6 | P: 11 | CP01 |", 1788s ) 1788s 1788s test/cli/commands_test.py:1995: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ['test/fixtures/cli/disable_noqa_test.sql', '--disable-noqa']] 1788s kwargs = {}, cli_input = None, mix_stderr = True 1788s assert_output_contains = 'L: 6 | P: 11 | CP01 |', raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s ______________________ test_cli_disable_noqa_except_flag _______________________ 1788s 1788s def test_cli_disable_noqa_except_flag(): 1788s """Test that --disable-noqa-except flag ignores inline noqa comments.""" 1788s > result = invoke_assert_code( 1788s ret_code=1, 1788s args=[ 1788s lint, 1788s [ 1788s "test/fixtures/cli/disable_noqa_test.sql", 1788s "--disable-noqa-except", 1788s "CP01", 1788s ], 1788s ], 1788s # Linting error is raised even though it is inline ignored. 1788s assert_output_contains=r"L: 8 | P: 5 | CP03 |", 1788s ) 1788s 1788s test/cli/commands_test.py:2011: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ['test/fixtures/cli/disable_noqa_test.sql', '--disable-noqa-except', 'CP01']] 1788s kwargs = {}, cli_input = None, mix_stderr = True 1788s assert_output_contains = 'L: 8 | P: 5 | CP03 |', raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s _________________ test_cli_disable_noqa_except_non_rules_flag __________________ 1788s 1788s def test_cli_disable_noqa_except_non_rules_flag(): 1788s """Test that --disable-noqa-except flag ignores all inline noqa comments.""" 1788s > invoke_assert_code( 1788s ret_code=1, 1788s args=[ 1788s lint, 1788s [ 1788s "test/fixtures/cli/disable_noqa_test.sql", 1788s "--disable-noqa-except", 1788s "None", 1788s ], 1788s ], 1788s # Linting error is raised even though it is inline ignored. 1788s assert_output_contains=r"L: 6 | P: 11 | CP01 |", 1788s ) 1788s 1788s test/cli/commands_test.py:2029: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ['test/fixtures/cli/disable_noqa_test.sql', '--disable-noqa-except', 'None']] 1788s kwargs = {}, cli_input = None, mix_stderr = True 1788s assert_output_contains = 'L: 6 | P: 11 | CP01 |', raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s ________________________ test_cli_warn_unused_noqa_flag ________________________ 1788s 1788s def test_cli_warn_unused_noqa_flag(): 1788s """Test that --warn-unused-ignores flag works.""" 1788s > invoke_assert_code( 1788s # Return value should still be success. 1788s ret_code=0, 1788s args=[ 1788s lint, 1788s [ 1788s "test/fixtures/cli/disable_noqa_test.sql", 1788s "--warn-unused-ignores", 1788s ], 1788s ], 1788s # Warning shown. 1788s assert_output_contains=( 1788s r"L: 5 | P: 18 | NOQA | WARNING: Unused noqa: 'noqa: CP01'" 1788s ), 1788s ) 1788s 1788s test/cli/commands_test.py:2046: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 0 1788s args = [, ['test/fixtures/cli/disable_noqa_test.sql', '--warn-unused-ignores']] 1788s kwargs = {}, cli_input = None, mix_stderr = True 1788s assert_output_contains = "L: 5 | P: 18 | NOQA | WARNING: Unused noqa: 'noqa: CP01'" 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s _____________ TestProgressBars.test_cli_lint_disabled_progress_bar _____________ 1788s 1788s self = 1788s mock_disable_progress_bar = 1788s 1788s def test_cli_lint_disabled_progress_bar( 1788s self, mock_disable_progress_bar: MagicMock 1788s ) -> None: 1788s """When progress bar is disabled, nothing should be printed into output.""" 1788s > result = invoke_assert_code( 1788s args=[ 1788s lint, 1788s [ 1788s "--disable-progress-bar", 1788s "test/fixtures/linter/passing.sql", 1788s ], 1788s ], 1788s ) 1788s 1788s test/cli/commands_test.py:2095: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 0 1788s args = [, ['--disable-progress-bar', 'test/fixtures/linter/passing.sql']] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s _____________ TestProgressBars.test_cli_lint_enabled_progress_bar ______________ 1788s 1788s self = 1788s mock_disable_progress_bar = 1788s 1788s def test_cli_lint_enabled_progress_bar( 1788s self, mock_disable_progress_bar: MagicMock 1788s ) -> None: 1788s """When progress bar is enabled, there should be some tracks in output.""" 1788s > result = invoke_assert_code( 1788s args=[ 1788s lint, 1788s [ 1788s "test/fixtures/linter/passing.sql", 1788s ], 1788s ], 1788s ) 1788s 1788s test/cli/commands_test.py:2114: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 0, args = [, ['test/fixtures/linter/passing.sql']] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s ______ TestProgressBars.test_cli_lint_enabled_progress_bar_multiple_paths ______ 1788s 1788s self = 1788s mock_disable_progress_bar = 1788s 1788s def test_cli_lint_enabled_progress_bar_multiple_paths( 1788s self, mock_disable_progress_bar: MagicMock 1788s ) -> None: 1788s """When progress bar is enabled, there should be some tracks in output.""" 1788s > result = invoke_assert_code( 1788s ret_code=1, 1788s args=[ 1788s lint, 1788s [ 1788s "test/fixtures/linter/passing.sql", 1788s "test/fixtures/linter/indentation_errors.sql", 1788s ], 1788s ], 1788s ) 1788s 1788s test/cli/commands_test.py:2132: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ['test/fixtures/linter/passing.sql', 'test/fixtures/linter/indentation_errors.sql']] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s ______ TestProgressBars.test_cli_lint_enabled_progress_bar_multiple_files ______ 1788s 1788s self = 1788s mock_disable_progress_bar = 1788s 1788s def test_cli_lint_enabled_progress_bar_multiple_files( 1788s self, mock_disable_progress_bar: MagicMock 1788s ) -> None: 1788s """When progress bar is enabled, there should be some tracks in output.""" 1788s > result = invoke_assert_code( 1788s args=[ 1788s lint, 1788s [ 1788s "test/fixtures/linter/multiple_files", 1788s ], 1788s ], 1788s ) 1788s 1788s test/cli/commands_test.py:2156: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 0, args = [, ['test/fixtures/linter/multiple_files']] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s ________________ test__cli__fix_multiple_errors_no_show_errors _________________ 1788s 1788s def test__cli__fix_multiple_errors_no_show_errors(): 1788s """Test the fix output.""" 1788s > invoke_assert_code( 1788s ret_code=1, 1788s args=[ 1788s fix, 1788s [ 1788s "--check", # Run in check mode to get the confirmation. 1788s "--disable-progress-bar", 1788s "test/fixtures/linter/multiple_sql_errors.sql", 1788s ], 1788s ], 1788s assert_output_contains=multiple_expected_output, 1788s ) 1788s 1788s test/cli/commands_test.py:2208: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ['--check', '--disable-progress-bar', 'test/fixtures/linter/multiple_sql_errors.sql']] 1788s kwargs = {}, cli_input = None, mix_stderr = True 1788s assert_output_contains = "==== finding fixable violations ====\n== [test/fixtures/linter/multiple_sql_errors.sql] FAIL\nL: 12 | P: 1 | LT02 ... fix these? [Y/n] ...\nInvalid input, please enter 'Y' or 'N'\nAborting...\n [4 unfixable linting violations found]\n" 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s __________________ test__cli__fix_multiple_errors_quiet_force __________________ 1788s 1788s def test__cli__fix_multiple_errors_quiet_force(): 1788s """Test the fix --quiet option with --force.""" 1788s > invoke_assert_code( 1788s ret_code=0, 1788s args=[ 1788s fix, 1788s [ 1788s "--disable-progress-bar", 1788s "test/fixtures/linter/multiple_sql_errors.sql", 1788s "--quiet", 1788s "-x", 1788s "_fix", 1788s ], 1788s ], 1788s assert_output_contains=( 1788s """== [test/fixtures/linter/multiple_sql_errors.sql] FIXED 1788s 2 fixable linting violations found""" 1788s ), 1788s ) 1788s 1788s test/cli/commands_test.py:2224: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 0 1788s args = [, ['--disable-progress-bar', 'test/fixtures/linter/multiple_sql_errors.sql', '--quiet', '-x', '_fix']] 1788s kwargs = {}, cli_input = None, mix_stderr = True 1788s assert_output_contains = '== [test/fixtures/linter/multiple_sql_errors.sql] FIXED\n2 fixable linting violations found' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s __________________ test__cli__fix_multiple_errors_quiet_check __________________ 1788s 1788s def test__cli__fix_multiple_errors_quiet_check(): 1788s """Test the fix --quiet option without --force.""" 1788s > invoke_assert_code( 1788s ret_code=0, 1788s args=[ 1788s fix, 1788s [ 1788s "--disable-progress-bar", 1788s "test/fixtures/linter/multiple_sql_errors.sql", 1788s "--check", # Run in check mode to get the confirmation. 1788s "--quiet", 1788s "-x", 1788s "_fix", 1788s ], 1788s # Test with the confirmation step. 1788s "y", 1788s ], 1788s assert_output_contains=( 1788s """2 fixable linting violations found 1788s Are you sure you wish to attempt to fix these? [Y/n] ... 1788s == [test/fixtures/linter/multiple_sql_errors.sql] FIXED 1788s All Finished""" 1788s ), 1788s ) 1788s 1788s test/cli/commands_test.py:2245: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 0 1788s args = [, ['--disable-progress-bar', 'test/fixtures/linter/multiple_sql_errors.sql', '--check', '--quiet', '-x', '_fix'], 'y'] 1788s kwargs = {}, cli_input = None, mix_stderr = True 1788s assert_output_contains = '2 fixable linting violations found\nAre you sure you wish to attempt to fix these? [Y/n] ...\n== [test/fixtures/linter/multiple_sql_errors.sql] FIXED\nAll Finished' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s __________________ test__cli__fix_multiple_errors_show_errors __________________ 1788s 1788s def test__cli__fix_multiple_errors_show_errors(): 1788s """Test the fix --show-lint-violations option.""" 1788s > result = invoke_assert_code( 1788s ret_code=1, 1788s args=[ 1788s fix, 1788s [ 1788s "--disable-progress-bar", 1788s "--show-lint-violations", 1788s "test/fixtures/linter/multiple_sql_errors.sql", 1788s "--check", # Run in check mode to get the confirmation. 1788s ], 1788s ], 1788s ) 1788s 1788s test/cli/commands_test.py:2271: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ['--disable-progress-bar', '--show-lint-violations', 'test/fixtures/linter/multiple_sql_errors.sql', '--check']] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s _______________________ test__cli__fix_show_parse_errors _______________________ 1788s 1788s def test__cli__fix_show_parse_errors(): 1788s """Test the fix --show-lint-violations option with parser error.""" 1788s > result = invoke_assert_code( 1788s ret_code=1, 1788s args=[ 1788s fix, 1788s [ 1788s "--show-lint-violations", 1788s "test/fixtures/linter/parse_lex_error.sql", 1788s ], 1788s ], 1788s ) 1788s 1788s test/cli/commands_test.py:2309: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ['--show-lint-violations', 'test/fixtures/linter/parse_lex_error.sql']] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s __________ test__cli__multiple_files__fix_multiple_errors_show_errors __________ 1788s 1788s def test__cli__multiple_files__fix_multiple_errors_show_errors(): 1788s """Basic check of lint ensures with multiple files, filenames are listed.""" 1788s sql_path = "test/fixtures/linter/multiple_sql_errors.sql" 1788s indent_path = "test/fixtures/linter/indentation_errors.sql" 1788s > result = invoke_assert_code( 1788s ret_code=1, 1788s args=[ 1788s fix, 1788s [ 1788s "--disable-progress-bar", 1788s "--check", # Run in check mode to get the confirmation. 1788s "--show-lint-violations", 1788s sql_path, 1788s indent_path, 1788s ], 1788s ], 1788s ) 1788s 1788s test/cli/commands_test.py:2349: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1 1788s args = [, ['--disable-progress-bar', '--check', '--show-lint-violations', 'test/fixtures/linter/multiple_sql_errors.sql', 'test/fixtures/linter/indentation_errors.sql']] 1788s kwargs = {}, cli_input = None, mix_stderr = True, assert_output_contains = '' 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s ____________________________ test__cli__render_fail ____________________________ 1788s 1788s def test__cli__render_fail(): 1788s """Basic how render fails.""" 1788s > invoke_assert_code( 1788s ret_code=1, 1788s args=[ 1788s render, 1788s [ 1788s "test/fixtures/cli/fail_many.sql", 1788s ], 1788s ], 1788s assert_output_contains=( 1788s "L: 3 | P: 8 | TMP | Undefined jinja template " "variable: 'something'" 1788s ), 1788s ) 1788s 1788s test/cli/commands_test.py:2379: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 1, args = [, ['test/fixtures/cli/fail_many.sql']] 1788s kwargs = {}, cli_input = None, mix_stderr = True 1788s assert_output_contains = "L: 3 | P: 8 | TMP | Undefined jinja template variable: 'something'" 1788s raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s ____________________________ test__cli__render_pass ____________________________ 1788s 1788s def test__cli__render_pass(): 1788s """Basic how render works.""" 1788s > invoke_assert_code( 1788s ret_code=0, 1788s args=[ 1788s render, 1788s [ 1788s "test/fixtures/templater/jinja_a/jinja.sql", 1788s ], 1788s ], 1788s assert_output_contains="SELECT 56 FROM sch1.tbl2", 1788s ) 1788s 1788s test/cli/commands_test.py:2395: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s ret_code = 0 1788s args = [, ['test/fixtures/templater/jinja_a/jinja.sql']] 1788s kwargs = {}, cli_input = None, mix_stderr = True 1788s assert_output_contains = 'SELECT 56 FROM sch1.tbl2', raise_exceptions = True 1788s 1788s def invoke_assert_code( 1788s ret_code: int = 0, 1788s args: Optional[List[Any]] = None, 1788s kwargs: Optional[Dict[str, Any]] = None, 1788s cli_input: Optional[str] = None, 1788s mix_stderr: bool = True, 1788s assert_output_contains: str = "", 1788s raise_exceptions: bool = True, 1788s ) -> Result: 1788s """Invoke a command and check return code.""" 1788s args = args or [] 1788s kwargs = kwargs or {} 1788s if cli_input: 1788s kwargs["input"] = cli_input 1788s > runner = CliRunner(mix_stderr=mix_stderr) 1788s E TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/utils/testing/cli.py:22: TypeError 1788s _______ test_diff_quality_plugin[sql_paths0-expected_violations_lines0] ________ 1788s 1788s sql_paths = ['linter/indentation_errors.sql'] 1788s expected_violations_lines = [2, 3, 4, 5, 6] 1788s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xed81f8b8> 1788s 1788s @pytest.mark.parametrize( 1788s "sql_paths,expected_violations_lines", 1788s [ 1788s (("linter/indentation_errors.sql",), list(range(2, 7))), 1788s (("linter/parse_error.sql",), {1}), 1788s # NB: This version of the file is in a directory configured 1788s # to ignore parsing errors. 1788s (("linter/diffquality/parse_error.sql",), []), 1788s (tuple(), []), 1788s ], 1788s ) 1788s def test_diff_quality_plugin(sql_paths, expected_violations_lines, monkeypatch): 1788s """Test the plugin at least finds errors on the expected lines.""" 1788s 1788s def execute(command, exit_codes): 1788s printable_command_parts = [ 1788s c.decode(sys.getfilesystemencoding()) if isinstance(c, bytes) else c 1788s for c in command 1788s ] 1788s 1788s result = invoke_assert_code( 1788s ret_code=1 if expected_violations_lines else 0, 1788s args=[ 1788s lint, 1788s printable_command_parts[2:], 1788s ], 1788s ) 1788s return result.output, "" 1788s 1788s # Mock the execute function -- this is an attempt to prevent the CircleCI 1788s # coverage check from hanging. (We've seen issues in the past where using 1788s # subprocesses caused things to occasionally hang.) 1788s monkeypatch.setattr(diff_quality_plugin, "execute", execute) 1788s monkeypatch.chdir("test/fixtures/") 1788s violation_reporter = diff_quality_plugin.diff_cover_report_quality( 1788s options="--processes=1" 1788s ) 1788s assert len(sql_paths) in (0, 1) 1788s sql_paths = [str(Path(sql_path)) for sql_path in sql_paths] 1788s 1788s > violations_dict = violation_reporter.violations_batch(sql_paths) 1788s 1788s /tmp/autopkgtest.MdGcw7/autopkgtest_tmp/test/diff_quality_plugin_test.py:53: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s self = 1788s src_paths = ['linter/indentation_errors.sql'] 1788s 1788s def violations_batch(self, src_paths): 1788s """Return a dictionary of Violations recorded in `src_paths`.""" 1788s # Check if SQLFluff is installed. 1788s if self.driver_tool_installed is None: 1788s self.driver_tool_installed = self.driver.installed() 1788s if not self.driver_tool_installed: # pragma: no cover 1788s > raise OSError(f"{self.driver.name} is not installed") 1788s E OSError: ['/usr/bin/python3.12', '-m', 'sqlfluff.cli.commands'] is not installed 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/diff_quality_plugin.py:61: OSError 1788s _______ test_diff_quality_plugin[sql_paths1-expected_violations_lines1] ________ 1788s 1788s sql_paths = ['linter/parse_error.sql'], expected_violations_lines = {1} 1788s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xed81f678> 1788s 1788s @pytest.mark.parametrize( 1788s "sql_paths,expected_violations_lines", 1788s [ 1788s (("linter/indentation_errors.sql",), list(range(2, 7))), 1788s (("linter/parse_error.sql",), {1}), 1788s # NB: This version of the file is in a directory configured 1788s # to ignore parsing errors. 1788s (("linter/diffquality/parse_error.sql",), []), 1788s (tuple(), []), 1788s ], 1788s ) 1788s def test_diff_quality_plugin(sql_paths, expected_violations_lines, monkeypatch): 1788s """Test the plugin at least finds errors on the expected lines.""" 1788s 1788s def execute(command, exit_codes): 1788s printable_command_parts = [ 1788s c.decode(sys.getfilesystemencoding()) if isinstance(c, bytes) else c 1788s for c in command 1788s ] 1788s 1788s result = invoke_assert_code( 1788s ret_code=1 if expected_violations_lines else 0, 1788s args=[ 1788s lint, 1788s printable_command_parts[2:], 1788s ], 1788s ) 1788s return result.output, "" 1788s 1788s # Mock the execute function -- this is an attempt to prevent the CircleCI 1788s # coverage check from hanging. (We've seen issues in the past where using 1788s # subprocesses caused things to occasionally hang.) 1788s monkeypatch.setattr(diff_quality_plugin, "execute", execute) 1788s monkeypatch.chdir("test/fixtures/") 1788s violation_reporter = diff_quality_plugin.diff_cover_report_quality( 1788s options="--processes=1" 1788s ) 1788s assert len(sql_paths) in (0, 1) 1788s sql_paths = [str(Path(sql_path)) for sql_path in sql_paths] 1788s 1788s > violations_dict = violation_reporter.violations_batch(sql_paths) 1788s 1788s /tmp/autopkgtest.MdGcw7/autopkgtest_tmp/test/diff_quality_plugin_test.py:53: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s self = 1788s src_paths = ['linter/parse_error.sql'] 1788s 1788s def violations_batch(self, src_paths): 1788s """Return a dictionary of Violations recorded in `src_paths`.""" 1788s # Check if SQLFluff is installed. 1788s if self.driver_tool_installed is None: 1788s self.driver_tool_installed = self.driver.installed() 1788s if not self.driver_tool_installed: # pragma: no cover 1788s > raise OSError(f"{self.driver.name} is not installed") 1788s E OSError: ['/usr/bin/python3.12', '-m', 'sqlfluff.cli.commands'] is not installed 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/diff_quality_plugin.py:61: OSError 1788s _______ test_diff_quality_plugin[sql_paths2-expected_violations_lines2] ________ 1788s 1788s sql_paths = ['linter/diffquality/parse_error.sql'] 1788s expected_violations_lines = [] 1788s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xee239d38> 1788s 1788s @pytest.mark.parametrize( 1788s "sql_paths,expected_violations_lines", 1788s [ 1788s (("linter/indentation_errors.sql",), list(range(2, 7))), 1788s (("linter/parse_error.sql",), {1}), 1788s # NB: This version of the file is in a directory configured 1788s # to ignore parsing errors. 1788s (("linter/diffquality/parse_error.sql",), []), 1788s (tuple(), []), 1788s ], 1788s ) 1788s def test_diff_quality_plugin(sql_paths, expected_violations_lines, monkeypatch): 1788s """Test the plugin at least finds errors on the expected lines.""" 1788s 1788s def execute(command, exit_codes): 1788s printable_command_parts = [ 1788s c.decode(sys.getfilesystemencoding()) if isinstance(c, bytes) else c 1788s for c in command 1788s ] 1788s 1788s result = invoke_assert_code( 1788s ret_code=1 if expected_violations_lines else 0, 1788s args=[ 1788s lint, 1788s printable_command_parts[2:], 1788s ], 1788s ) 1788s return result.output, "" 1788s 1788s # Mock the execute function -- this is an attempt to prevent the CircleCI 1788s # coverage check from hanging. (We've seen issues in the past where using 1788s # subprocesses caused things to occasionally hang.) 1788s monkeypatch.setattr(diff_quality_plugin, "execute", execute) 1788s monkeypatch.chdir("test/fixtures/") 1788s violation_reporter = diff_quality_plugin.diff_cover_report_quality( 1788s options="--processes=1" 1788s ) 1788s assert len(sql_paths) in (0, 1) 1788s sql_paths = [str(Path(sql_path)) for sql_path in sql_paths] 1788s 1788s > violations_dict = violation_reporter.violations_batch(sql_paths) 1788s 1788s /tmp/autopkgtest.MdGcw7/autopkgtest_tmp/test/diff_quality_plugin_test.py:53: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s self = 1788s src_paths = ['linter/diffquality/parse_error.sql'] 1788s 1788s def violations_batch(self, src_paths): 1788s """Return a dictionary of Violations recorded in `src_paths`.""" 1788s # Check if SQLFluff is installed. 1788s if self.driver_tool_installed is None: 1788s self.driver_tool_installed = self.driver.installed() 1788s if not self.driver_tool_installed: # pragma: no cover 1788s > raise OSError(f"{self.driver.name} is not installed") 1788s E OSError: ['/usr/bin/python3.12', '-m', 'sqlfluff.cli.commands'] is not installed 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/diff_quality_plugin.py:61: OSError 1788s _______ test_diff_quality_plugin[sql_paths3-expected_violations_lines3] ________ 1788s 1788s sql_paths = [], expected_violations_lines = [] 1788s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xee2394e0> 1788s 1788s @pytest.mark.parametrize( 1788s "sql_paths,expected_violations_lines", 1788s [ 1788s (("linter/indentation_errors.sql",), list(range(2, 7))), 1788s (("linter/parse_error.sql",), {1}), 1788s # NB: This version of the file is in a directory configured 1788s # to ignore parsing errors. 1788s (("linter/diffquality/parse_error.sql",), []), 1788s (tuple(), []), 1788s ], 1788s ) 1788s def test_diff_quality_plugin(sql_paths, expected_violations_lines, monkeypatch): 1788s """Test the plugin at least finds errors on the expected lines.""" 1788s 1788s def execute(command, exit_codes): 1788s printable_command_parts = [ 1788s c.decode(sys.getfilesystemencoding()) if isinstance(c, bytes) else c 1788s for c in command 1788s ] 1788s 1788s result = invoke_assert_code( 1788s ret_code=1 if expected_violations_lines else 0, 1788s args=[ 1788s lint, 1788s printable_command_parts[2:], 1788s ], 1788s ) 1788s return result.output, "" 1788s 1788s # Mock the execute function -- this is an attempt to prevent the CircleCI 1788s # coverage check from hanging. (We've seen issues in the past where using 1788s # subprocesses caused things to occasionally hang.) 1788s monkeypatch.setattr(diff_quality_plugin, "execute", execute) 1788s monkeypatch.chdir("test/fixtures/") 1788s violation_reporter = diff_quality_plugin.diff_cover_report_quality( 1788s options="--processes=1" 1788s ) 1788s assert len(sql_paths) in (0, 1) 1788s sql_paths = [str(Path(sql_path)) for sql_path in sql_paths] 1788s 1788s > violations_dict = violation_reporter.violations_batch(sql_paths) 1788s 1788s /tmp/autopkgtest.MdGcw7/autopkgtest_tmp/test/diff_quality_plugin_test.py:53: 1788s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1788s 1788s self = 1788s src_paths = [] 1788s 1788s def violations_batch(self, src_paths): 1788s """Return a dictionary of Violations recorded in `src_paths`.""" 1788s # Check if SQLFluff is installed. 1788s if self.driver_tool_installed is None: 1788s self.driver_tool_installed = self.driver.installed() 1788s if not self.driver_tool_installed: # pragma: no cover 1788s > raise OSError(f"{self.driver.name} is not installed") 1788s E OSError: ['/usr/bin/python3.12', '-m', 'sqlfluff.cli.commands'] is not installed 1788s 1788s /usr/lib/python3/dist-packages/sqlfluff/diff_quality_plugin.py:61: OSError 1788s =========================== short test summary info ============================ 1788s FAILED test/cli/commands_test.py::test__cli__command_directed - TypeError: Cl... 1788s FAILED test/cli/commands_test.py::test__cli__command_dialect - TypeError: Cli... 1788s FAILED test/cli/commands_test.py::test__cli__command_no_dialect[command0] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_no_dialect[command1] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_no_dialect[command2] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_no_dialect[command3] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_no_dialect[command4] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_parse_error_dialect_explicit_warning 1788s FAILED test/cli/commands_test.py::test__cli__command_parse_error_dialect_implicit_warning 1788s FAILED test/cli/commands_test.py::test__cli__command_dialect_legacy - TypeErr... 1788s FAILED test/cli/commands_test.py::test__cli__command_extra_config_fail - Type... 1788s FAILED test/cli/commands_test.py::test__cli__command_stdin_filename_config[command0-test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql-0-[L: 5, P: 1] | join_clause:\n[L: 5, P: 1] | keyword: 'POSITIONAL'] 1788s FAILED test/cli/commands_test.py::test__cli__command_stdin_filename_config[command1-test/fixtures/an_ansi_config_here.sql-1-Parsing errors found and dialect is set to 'ansi'.] 1788s FAILED test/cli/commands_test.py::test__cli__command_stdin_filename_config[command2-test/fixtures/cli/stdin_filename/stdin_filename.sql-0-All Finished!] 1788s FAILED test/cli/commands_test.py::test__cli__command_stdin_filename_config[command3-test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql-0-All Finished!] 1788s FAILED test/cli/commands_test.py::test__cli__command_stdin_filename_config[command4-test/fixtures/an_ansi_config_here.sql-1-Parsing errors found and dialect is set to 'ansi'.] 1788s FAILED test/cli/commands_test.py::test__cli__command_stdin_filename_config[command5-test/fixtures/cli/stdin_filename/stdin_filename.sql-0-SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n] 1788s FAILED test/cli/commands_test.py::test__cli__command_stdin_filename_config[command6-test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql-0-SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n] 1788s FAILED test/cli/commands_test.py::test__cli__command_stdin_filename_config[command7-test/fixtures/an_ansi_config_here.sql-1-[1 templating/parsing errors found]] 1788s FAILED test/cli/commands_test.py::test__cli__command_stdin_filename_config[command8-test/fixtures/cli/stdin_filename/stdin_filename.sql-0-SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n] 1788s FAILED test/cli/commands_test.py::test__cli__command_stdin_filename_config[command9-test/fixtures/cli/stdin_filename/without_config/stdin_filename.sql-0-SELECT\n A.COL1,\n B.COL2\nFROM TABA AS A\nPOSITIONAL JOIN TABB AS B;\n] 1788s FAILED test/cli/commands_test.py::test__cli__command_stdin_filename_config[command10-test/fixtures/an_ansi_config_here.sql-1-Unfixable violations detected.] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_stdin[command0] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_stdin[command1] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_stdin[command2] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_stdin[command3] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_empty_stdin - TypeE... 1788s FAILED test/cli/commands_test.py::test__cli__command_render_stdin - TypeError... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command0] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command1] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command2] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command3] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command4] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command5] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command6] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command7] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command8] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command9] - T... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command10] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command11] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command12] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command13] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command14] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command15] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command16] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command17] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command18] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command19] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command20] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command21] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command22] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command23] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command24] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command25] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command26] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command27] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command28] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse[command29] - ... 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command0-1] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command1-1] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command2-1] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command3-0] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command4-0] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command5-2] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command6-1] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command7-0] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command8-1] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command9-1] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command10-1] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command11-2] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command12-1] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command13-1] 1788s FAILED test/cli/commands_test.py::test__cli__command_rules - TypeError: CliRu... 1788s FAILED test/cli/commands_test.py::test__cli__command_dialects - TypeError: Cl... 1788s FAILED test/cli/commands_test.py::test__cli__command__fix[LT01-test/fixtures/linter/indentation_errors.sql0] 1788s FAILED test/cli/commands_test.py::test__cli__command__fix[LT01-test/fixtures/linter/whitespace_errors.sql] 1788s FAILED test/cli/commands_test.py::test__cli__command__fix[LT01-test/fixtures/linter/indentation_errors.sql1] 1788s FAILED test/cli/commands_test.py::test__cli__command__fix[LT02-test/fixtures/linter/indentation_error_hard.sql] 1788s FAILED test/cli/commands_test.py::test_cli_fix_even_unparsable[command-line-False] 1788s FAILED test/cli/commands_test.py::test_cli_fix_even_unparsable[command-line-True] 1788s FAILED test/cli/commands_test.py::test_cli_fix_even_unparsable[config-file-False] 1788s FAILED test/cli/commands_test.py::test_cli_fix_even_unparsable[config-file-True] 1788s FAILED test/cli/commands_test.py::test__cli__command_fix_stdin[select * from t-LT02-select * from t] 1788s FAILED test/cli/commands_test.py::test__cli__command_fix_stdin[ select * from t-LT02-select * from t] 1788s FAILED test/cli/commands_test.py::test__cli__command_format_stdin[select * from t\n-select * from t\n] 1788s FAILED test/cli/commands_test.py::test__cli__command_format_stdin[ select * FRoM t -select * from t\n] 1788s FAILED test/cli/commands_test.py::test__cli__command_format_stdin[select\n count(*) over (\n order by a desc \n range between b row and '10 seconds' following -- noqa: PRS\n ) as c\nfrom d\n-select\n count(*) over (\n order by a desc \n range between b row and '10 seconds' following -- noqa: PRS\n ) as c\nfrom d\n] 1788s FAILED test/cli/commands_test.py::test__cli__command_fix_stdin_logging_to_stderr 1788s FAILED test/cli/commands_test.py::test__cli__command_fix_stdin_safety - TypeE... 1788s FAILED test/cli/commands_test.py::test__cli__command_fix_stdin_error_exit_code[create TABLE {{ params.dsfsdfds }}.t (a int)-1--v-Fix aborted due to unparsable template variables.] 1788s FAILED test/cli/commands_test.py::test__cli__command_fix_stdin_error_exit_code[create TABLE a.t (a int)-0--] 1788s FAILED test/cli/commands_test.py::test__cli__command_fix_stdin_error_exit_code[create table a.t (a int)-0--] 1788s FAILED test/cli/commands_test.py::test__cli__command_fix_stdin_error_exit_code[select col from a join b using (c)-1--v-Unfixable violations detected.] 1788s FAILED test/cli/commands_test.py::test__cli__command__fix_check[LT01-test/fixtures/linter/indentation_errors.sql-y-0-0] 1788s FAILED test/cli/commands_test.py::test__cli__command__fix_check[LT01-test/fixtures/linter/indentation_errors.sql-n-1-1] 1788s FAILED test/cli/commands_test.py::test__cli__command_parse_serialize_from_stdin[None-yaml] 1788s FAILED test/cli/commands_test.py::test__cli__command_parse_serialize_from_stdin[None-json] 1788s FAILED test/cli/commands_test.py::test__cli__command_parse_serialize_from_stdin[outfile-yaml] 1788s FAILED test/cli/commands_test.py::test__cli__command_parse_serialize_from_stdin[outfile-json] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_from_stdin[select * from tbl-CP01-expected0-0-yaml] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_from_stdin[select * from tbl-CP01-expected0-0-json] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_from_stdin[select * from tbl-CP01-expected0-0-none] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_from_stdin[SElect * from tbl-CP01-expected1-1-yaml] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_from_stdin[SElect * from tbl-CP01-expected1-1-json] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_from_stdin[SElect * from tbl-CP01-expected1-1-none] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_from_stdin[SELECT {{1}}-JJ01-expected2-1-yaml] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_from_stdin[SELECT {{1}}-JJ01-expected2-1-json] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_from_stdin[SELECT {{1}}-JJ01-expected2-1-none] 1788s FAILED test/cli/commands_test.py::test__cli__command_fail_nice_not_found[command0] 1788s FAILED test/cli/commands_test.py::test__cli__command_fail_nice_not_found[command1] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_multiple_files[None-human] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_multiple_files[None-yaml] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_multiple_files[None-json] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_multiple_files[None-github-annotation] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_multiple_files[None-github-annotation-native] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_multiple_files[None-none] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_multiple_files[outfile-human] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_multiple_files[outfile-yaml] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_multiple_files[outfile-json] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_multiple_files[outfile-github-annotation] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_multiple_files[outfile-github-annotation-native] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_multiple_files[outfile-none] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_github_annotation 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_github_annotation_native[test/fixtures/linter/identifier_capitalisation.sql-::group::{filename}\n::error title=SQLFluff,file={filename},line=3,col=5,endLine=3,endColumn=8::RF02: Unqualified reference 'foo' found in select with more than one referenced table/view. [references.qualification]\n::error title=SQLFluff,file={filename},line=4,col=1,endLine=4,endColumn=5::LT02: Expected indent of 8 spaces. [layout.indent]\n::error title=SQLFluff,file={filename},line=4,col=5,endLine=4,endColumn=8::AL02: Implicit/explicit aliasing of columns. [aliasing.column]\n::error title=SQLFluff,file={filename},line=4,col=5,endLine=4,endColumn=8::CP02: Unquoted identifiers must be consistently lower case. [capitalisation.identifiers]\n::notice title=SQLFluff,file={filename},line=5,col=1,endLine=5,endColumn=5::CP01: Keywords must be consistently lower case. [capitalisation.keywords]\n::error title=SQLFluff,file={filename},line=5,col=12,endLine=5,endColumn=16::CP02: Unquoted identifiers must be consistently lower case. [capitalisation.identifiers]\n::error title=SQLFluff,file={filename},line=5,col=18,endLine=5,endColumn=22::CP02: Unquoted identifiers must be consistently lower case. [capitalisation.identifiers]\n::endgroup::\n] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_github_annotation_native[test/fixtures/linter/jinja_spacing.sql-::group::{filename}\n::error title=SQLFluff,file={filename},line=3,col=15,endLine=3,endColumn=22::JJ01: Jinja tags should have a single whitespace on either side: {{{{foo}}}} [jinja.padding]\n::endgroup::\n] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_annotation_level_error_failure_equivalent[github-annotation] 1788s FAILED test/cli/commands_test.py::test__cli__command_lint_serialize_annotation_level_error_failure_equivalent[github-annotation-native] 1788s FAILED test/cli/commands_test.py::test_encoding[utf-8-ascii] - TypeError: Cli... 1788s FAILED test/cli/commands_test.py::test_encoding[utf-8-sig-UTF-8-SIG] - TypeEr... 1788s FAILED test/cli/commands_test.py::test_encoding[utf-32-UTF-32] - TypeError: C... 1788s FAILED test/cli/commands_test.py::test_cli_encoding[utf-8-command-line-False] 1788s FAILED test/cli/commands_test.py::test_cli_encoding[utf-8-SIG-command-line-True] 1788s FAILED test/cli/commands_test.py::test_cli_encoding[utf-8-config-file-False] 1788s FAILED test/cli/commands_test.py::test_cli_encoding[utf-8-SIG-config-file-True] 1788s FAILED test/cli/commands_test.py::test_cli_no_disable_noqa_flag - TypeError: ... 1788s FAILED test/cli/commands_test.py::test_cli_disable_noqa_flag - TypeError: Cli... 1788s FAILED test/cli/commands_test.py::test_cli_disable_noqa_except_flag - TypeErr... 1788s FAILED test/cli/commands_test.py::test_cli_disable_noqa_except_non_rules_flag 1788s FAILED test/cli/commands_test.py::test_cli_warn_unused_noqa_flag - TypeError:... 1788s FAILED test/cli/commands_test.py::TestProgressBars::test_cli_lint_disabled_progress_bar 1788s FAILED test/cli/commands_test.py::TestProgressBars::test_cli_lint_enabled_progress_bar 1788s FAILED test/cli/commands_test.py::TestProgressBars::test_cli_lint_enabled_progress_bar_multiple_paths 1788s FAILED test/cli/commands_test.py::TestProgressBars::test_cli_lint_enabled_progress_bar_multiple_files 1788s FAILED test/cli/commands_test.py::test__cli__fix_multiple_errors_no_show_errors 1788s FAILED test/cli/commands_test.py::test__cli__fix_multiple_errors_quiet_force 1788s FAILED test/cli/commands_test.py::test__cli__fix_multiple_errors_quiet_check 1788s FAILED test/cli/commands_test.py::test__cli__fix_multiple_errors_show_errors 1788s FAILED test/cli/commands_test.py::test__cli__fix_show_parse_errors - TypeErro... 1788s FAILED test/cli/commands_test.py::test__cli__multiple_files__fix_multiple_errors_show_errors 1788s FAILED test/cli/commands_test.py::test__cli__render_fail - TypeError: CliRunn... 1788s FAILED test/cli/commands_test.py::test__cli__render_pass - TypeError: CliRunn... 1788s FAILED test/diff_quality_plugin_test.py::test_diff_quality_plugin[sql_paths0-expected_violations_lines0] 1788s FAILED test/diff_quality_plugin_test.py::test_diff_quality_plugin[sql_paths1-expected_violations_lines1] 1788s FAILED test/diff_quality_plugin_test.py::test_diff_quality_plugin[sql_paths2-expected_violations_lines2] 1788s FAILED test/diff_quality_plugin_test.py::test_diff_quality_plugin[sql_paths3-expected_violations_lines3] 1788s ==== 155 failed, 8364 passed, 1 skipped, 1 deselected in 1406.32s (0:23:26) ==== 1790s autopkgtest [05:24:57]: test upstream: -----------------------] 1795s autopkgtest [05:25:02]: test upstream: - - - - - - - - - - results - - - - - - - - - - 1795s upstream FAIL non-zero exit status 1 1799s autopkgtest [05:25:06]: @@@@@@@@@@@@@@@@@@@@ summary 1799s upstream FAIL non-zero exit status 1