0s autopkgtest [17:12:57]: starting date and time: 2024-12-27 17:12:57+0000 0s autopkgtest [17:12:57]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [17:12:57]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.mb9839aq/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:python3-defaults --apt-upgrade python-aiomodernforms --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=python3-defaults/3.12.8-1 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-s390x --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@bos03-s390x-15.secgroup --name adt-plucky-s390x-python-aiomodernforms-20241227-171257-juju-7f2275-prod-proposed-migration-environment-2-541c57a8-e40d-4e9f-afd3-a4d029212623 --image adt/ubuntu-plucky-s390x-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-proposed-migration-s390x -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 101s autopkgtest [17:14:38]: testbed dpkg architecture: s390x 101s autopkgtest [17:14:38]: testbed apt version: 2.9.18 102s autopkgtest [17:14:39]: @@@@@@@@@@@@@@@@@@@@ test bed setup 102s autopkgtest [17:14:39]: testbed release detected to be: None 103s autopkgtest [17:14:40]: updating testbed package index (apt update) 103s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [73.9 kB] 103s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 103s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 103s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 103s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/restricted Sources [9708 B] 103s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [11.5 kB] 103s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [56.0 kB] 103s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [620 kB] 103s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x Packages [57.3 kB] 103s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted s390x Packages [756 B] 103s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe s390x Packages [469 kB] 103s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse s390x Packages [4260 B] 104s Fetched 1303 kB in 1s (1507 kB/s) 104s Reading package lists... 105s Reading package lists... 105s Building dependency tree... 105s Reading state information... 105s Calculating upgrade... 105s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 105s Reading package lists... 105s Building dependency tree... 105s Reading state information... 105s 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. 105s autopkgtest [17:14:42]: upgrading testbed (apt dist-upgrade and autopurge) 106s Reading package lists... 106s Building dependency tree... 106s Reading state information... 106s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 106s Starting 2 pkgProblemResolver with broken count: 0 106s Done 106s Entering ResolveByKeep 106s 106s The following packages will be upgraded: 106s libpython3-stdlib python3 python3-minimal 106s 3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 106s Need to get 61.5 kB of archives. 106s After this operation, 0 B of additional disk space will be used. 106s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x python3-minimal s390x 3.12.8-1 [27.5 kB] 107s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x python3 s390x 3.12.8-1 [23.9 kB] 107s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libpython3-stdlib s390x 3.12.8-1 [10.1 kB] 107s Fetched 61.5 kB in 0s (231 kB/s) 107s (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 ... 55491 files and directories currently installed.) 107s Preparing to unpack .../python3-minimal_3.12.8-1_s390x.deb ... 107s Unpacking python3-minimal (3.12.8-1) over (3.12.7-1) ... 107s Setting up python3-minimal (3.12.8-1) ... 107s (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 ... 55491 files and directories currently installed.) 107s Preparing to unpack .../python3_3.12.8-1_s390x.deb ... 107s Unpacking python3 (3.12.8-1) over (3.12.7-1) ... 107s Preparing to unpack .../libpython3-stdlib_3.12.8-1_s390x.deb ... 107s Unpacking libpython3-stdlib:s390x (3.12.8-1) over (3.12.7-1) ... 107s Setting up libpython3-stdlib:s390x (3.12.8-1) ... 107s Setting up python3 (3.12.8-1) ... 107s Processing triggers for man-db (2.13.0-1) ... 108s Reading package lists... 108s Building dependency tree... 108s Reading state information... 108s Starting pkgProblemResolver with broken count: 0 108s Starting 2 pkgProblemResolver with broken count: 0 108s Done 108s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 111s autopkgtest [17:14:48]: testbed running kernel: Linux 6.11.0-8-generic #8-Ubuntu SMP Mon Sep 16 12:49:35 UTC 2024 111s autopkgtest [17:14:48]: @@@@@@@@@@@@@@@@@@@@ apt-source python-aiomodernforms 112s Get:1 http://ftpmaster.internal/ubuntu plucky/universe python-aiomodernforms 0.1.8-2 (dsc) [2407 B] 112s Get:2 http://ftpmaster.internal/ubuntu plucky/universe python-aiomodernforms 0.1.8-2 (tar) [34.5 kB] 112s Get:3 http://ftpmaster.internal/ubuntu plucky/universe python-aiomodernforms 0.1.8-2 (diff) [2120 B] 112s gpgv: Signature made Wed Aug 14 20:49:59 2024 UTC 112s gpgv: using RSA key A0B1A9F3508956130E7A425CD416AD15AC6B43FE 112s gpgv: Can't check signature: No public key 112s dpkg-source: warning: cannot verify inline signature for ./python-aiomodernforms_0.1.8-2.dsc: no acceptable signature found 112s autopkgtest [17:14:49]: testing package python-aiomodernforms version 0.1.8-2 113s autopkgtest [17:14:50]: build not needed 113s autopkgtest [17:14:50]: test pybuild-autopkgtest: preparing testbed 113s Reading package lists... 113s Building dependency tree... 113s Reading state information... 113s Starting pkgProblemResolver with broken count: 0 113s Starting 2 pkgProblemResolver with broken count: 0 113s Done 114s The following NEW packages will be installed: 114s autoconf automake autopoint autotools-dev build-essential cpp cpp-14 114s cpp-14-s390x-linux-gnu cpp-s390x-linux-gnu debhelper debugedit dh-autoreconf 114s dh-python dh-strip-nondeterminism dwz g++ g++-14 g++-14-s390x-linux-gnu 114s g++-s390x-linux-gnu gcc gcc-14 gcc-14-s390x-linux-gnu gcc-s390x-linux-gnu 114s gettext intltool-debian libarchive-zip-perl libasan8 libcc1-0 114s libdebhelper-perl libfile-stripnondeterminism-perl libgcc-14-dev libgomp1 114s libisl23 libitm1 libjs-jquery libjs-jquery-hotkeys libjs-jquery-isonscreen 114s libjs-jquery-metadata libjs-jquery-tablesorter 114s libjs-jquery-throttle-debounce libmpc3 libpython3.13-minimal 114s libpython3.13-stdlib libstdc++-14-dev libtool libubsan1 m4 114s openstack-pkg-tools po-debconf pybuild-plugin-pyproject python3-aiohttp 114s python3-aiomodernforms python3-aiosignal python3-all python3-aresponses 114s python3-async-generator python3-async-timeout python3-backoff python3-build 114s python3-coverage python3-frozenlist python3-iniconfig python3-installer 114s python3-multidict python3-mypy python3-mypy-extensions python3-packaging 114s python3-pip python3-pluggy python3-psutil python3-pyproject-hooks 114s python3-pytest python3-pytest-asyncio python3-pytest-cov python3-toml 114s python3-wheel python3-yarl python3.13 python3.13-minimal 114s 0 upgraded, 79 newly installed, 0 to remove and 0 not upgraded. 114s Need to get 79.0 MB of archives. 114s After this operation, 281 MB of additional disk space will be used. 114s Get:1 http://ftpmaster.internal/ubuntu plucky/main s390x libpython3.13-minimal s390x 3.13.1-2 [880 kB] 114s Get:2 http://ftpmaster.internal/ubuntu plucky/main s390x python3.13-minimal s390x 3.13.1-2 [2364 kB] 114s Get:3 http://ftpmaster.internal/ubuntu plucky/main s390x libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 114s Get:4 http://ftpmaster.internal/ubuntu plucky/universe s390x libjs-jquery-hotkeys all 0~20130707+git2d51e3a9+dfsg-2.1 [11.5 kB] 114s Get:5 http://ftpmaster.internal/ubuntu plucky/main s390x m4 s390x 1.4.19-4build1 [256 kB] 114s Get:6 http://ftpmaster.internal/ubuntu plucky/main s390x autoconf all 2.72-3 [382 kB] 114s Get:7 http://ftpmaster.internal/ubuntu plucky/main s390x autotools-dev all 20220109.1 [44.9 kB] 114s Get:8 http://ftpmaster.internal/ubuntu plucky/main s390x automake all 1:1.16.5-1.3ubuntu1 [558 kB] 114s Get:9 http://ftpmaster.internal/ubuntu plucky/main s390x autopoint all 0.22.5-3 [616 kB] 114s Get:10 http://ftpmaster.internal/ubuntu plucky/main s390x libisl23 s390x 0.27-1 [704 kB] 114s Get:11 http://ftpmaster.internal/ubuntu plucky/main s390x libmpc3 s390x 1.3.1-1build2 [57.8 kB] 114s Get:12 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-14-s390x-linux-gnu s390x 14.2.0-11ubuntu1 [9575 kB] 115s Get:13 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-14 s390x 14.2.0-11ubuntu1 [1028 B] 115s Get:14 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-s390x-linux-gnu s390x 4:14.1.0-2ubuntu1 [5452 B] 115s Get:15 http://ftpmaster.internal/ubuntu plucky/main s390x cpp s390x 4:14.1.0-2ubuntu1 [22.4 kB] 115s Get:16 http://ftpmaster.internal/ubuntu plucky/main s390x libcc1-0 s390x 14.2.0-11ubuntu1 [50.7 kB] 115s Get:17 http://ftpmaster.internal/ubuntu plucky/main s390x libgomp1 s390x 14.2.0-11ubuntu1 [151 kB] 115s Get:18 http://ftpmaster.internal/ubuntu plucky/main s390x libitm1 s390x 14.2.0-11ubuntu1 [30.9 kB] 115s Get:19 http://ftpmaster.internal/ubuntu plucky/main s390x libasan8 s390x 14.2.0-11ubuntu1 [2964 kB] 115s Get:20 http://ftpmaster.internal/ubuntu plucky/main s390x libubsan1 s390x 14.2.0-11ubuntu1 [1184 kB] 115s Get:21 http://ftpmaster.internal/ubuntu plucky/main s390x libgcc-14-dev s390x 14.2.0-11ubuntu1 [1036 kB] 115s Get:22 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-14-s390x-linux-gnu s390x 14.2.0-11ubuntu1 [18.7 MB] 115s Get:23 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-14 s390x 14.2.0-11ubuntu1 [521 kB] 115s Get:24 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-s390x-linux-gnu s390x 4:14.1.0-2ubuntu1 [1204 B] 115s Get:25 http://ftpmaster.internal/ubuntu plucky/main s390x gcc s390x 4:14.1.0-2ubuntu1 [4996 B] 115s Get:26 http://ftpmaster.internal/ubuntu plucky/main s390x libstdc++-14-dev s390x 14.2.0-11ubuntu1 [2610 kB] 115s Get:27 http://ftpmaster.internal/ubuntu plucky/main s390x g++-14-s390x-linux-gnu s390x 14.2.0-11ubuntu1 [11.0 MB] 115s Get:28 http://ftpmaster.internal/ubuntu plucky/main s390x g++-14 s390x 14.2.0-11ubuntu1 [20.1 kB] 115s Get:29 http://ftpmaster.internal/ubuntu plucky/main s390x g++-s390x-linux-gnu s390x 4:14.1.0-2ubuntu1 [956 B] 115s Get:30 http://ftpmaster.internal/ubuntu plucky/main s390x g++ s390x 4:14.1.0-2ubuntu1 [1076 B] 115s Get:31 http://ftpmaster.internal/ubuntu plucky/main s390x build-essential s390x 12.10ubuntu1 [4930 B] 115s Get:32 http://ftpmaster.internal/ubuntu plucky/main s390x libdebhelper-perl all 13.20ubuntu1 [94.2 kB] 115s Get:33 http://ftpmaster.internal/ubuntu plucky/main s390x libtool all 2.4.7-8 [166 kB] 115s Get:34 http://ftpmaster.internal/ubuntu plucky/main s390x dh-autoreconf all 20 [16.1 kB] 115s Get:35 http://ftpmaster.internal/ubuntu plucky/main s390x libarchive-zip-perl all 1.68-1 [90.2 kB] 115s Get:36 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-stripnondeterminism-perl all 1.14.0-1 [20.1 kB] 116s Get:37 http://ftpmaster.internal/ubuntu plucky/main s390x dh-strip-nondeterminism all 1.14.0-1 [5058 B] 116s Get:38 http://ftpmaster.internal/ubuntu plucky/main s390x debugedit s390x 1:5.1-1 [49.9 kB] 116s Get:39 http://ftpmaster.internal/ubuntu plucky/main s390x dwz s390x 0.15-1build6 [122 kB] 116s Get:40 http://ftpmaster.internal/ubuntu plucky/main s390x gettext s390x 0.22.5-3 [997 kB] 116s Get:41 http://ftpmaster.internal/ubuntu plucky/main s390x intltool-debian all 0.35.0+20060710.6 [23.2 kB] 116s Get:42 http://ftpmaster.internal/ubuntu plucky/main s390x po-debconf all 1.0.21+nmu1 [233 kB] 116s Get:43 http://ftpmaster.internal/ubuntu plucky/main s390x debhelper all 13.20ubuntu1 [893 kB] 116s Get:44 http://ftpmaster.internal/ubuntu plucky/universe s390x dh-python all 6.20241217 [117 kB] 116s Get:45 http://ftpmaster.internal/ubuntu plucky/universe s390x libjs-jquery-metadata all 12-4 [6582 B] 116s Get:46 http://ftpmaster.internal/ubuntu plucky/universe s390x libjs-jquery-tablesorter all 1:2.31.3+dfsg1-4 [192 kB] 116s Get:47 http://ftpmaster.internal/ubuntu plucky/universe s390x libjs-jquery-throttle-debounce all 1.1+dfsg.1-2 [12.5 kB] 116s Get:48 http://ftpmaster.internal/ubuntu plucky/main s390x libpython3.13-stdlib s390x 3.13.1-2 [2074 kB] 116s Get:49 http://ftpmaster.internal/ubuntu plucky/main s390x python3-packaging all 24.2-1 [51.5 kB] 116s Get:50 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-pyproject-hooks all 1.2.0-1 [10.2 kB] 116s Get:51 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-toml all 0.10.2-1 [16.5 kB] 116s Get:52 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-wheel all 0.45.1-1 [57.7 kB] 116s Get:53 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-build all 1.2.2-1 [31.0 kB] 116s Get:54 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-installer all 0.7.0+dfsg1-3 [17.4 kB] 116s Get:55 http://ftpmaster.internal/ubuntu plucky/universe s390x pybuild-plugin-pyproject all 6.20241217 [1730 B] 116s Get:56 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-multidict s390x 6.1.0-1build1 [38.4 kB] 116s Get:57 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-yarl s390x 1.9.4-1 [72.8 kB] 116s Get:58 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-async-timeout all 5.0.1-1 [6830 B] 116s Get:59 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-frozenlist s390x 1.5.0-1build1 [64.2 kB] 116s Get:60 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-aiosignal all 1.3.1-1 [5172 B] 116s Get:61 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-aiohttp s390x 3.9.5-1 [294 kB] 116s Get:62 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-backoff all 2.2.1-2 [17.9 kB] 116s Get:63 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-aiomodernforms all 0.1.8-2 [8106 B] 116s Get:64 http://ftpmaster.internal/ubuntu plucky/main s390x python3.13 s390x 3.13.1-2 [729 kB] 116s Get:65 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x python3-all s390x 3.12.8-1 [894 B] 116s Get:66 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-async-generator all 1.10-4 [17.5 kB] 116s Get:67 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-iniconfig all 1.1.1-2 [6024 B] 116s Get:68 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-pluggy all 1.5.0-1 [21.0 kB] 116s Get:69 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-pytest all 8.3.3-1 [251 kB] 116s Get:70 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-pytest-asyncio all 0.24.0a1-1 [15.8 kB] 116s Get:71 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-aresponses all 3.0.0-2 [13.8 kB] 116s Get:72 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-coverage s390x 7.4.4+dfsg1-0ubuntu3 [150 kB] 116s Get:73 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-mypy-extensions all 1.0.0-1 [6148 B] 116s Get:74 http://ftpmaster.internal/ubuntu plucky/main s390x python3-psutil s390x 5.9.8-2build3 [195 kB] 116s Get:75 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-mypy s390x 1.14.0-1 [16.1 MB] 117s Get:76 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-pip all 24.3.1+dfsg-1 [1404 kB] 117s Get:77 http://ftpmaster.internal/ubuntu plucky/universe s390x libjs-jquery-isonscreen all 1.2.0-1.1 [3244 B] 117s Get:78 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-pytest-cov all 5.0.0-1 [21.3 kB] 117s Get:79 http://ftpmaster.internal/ubuntu plucky/universe s390x openstack-pkg-tools all 123ubuntu2 [94.5 kB] 117s Fetched 79.0 MB in 3s (25.7 MB/s) 117s Selecting previously unselected package libpython3.13-minimal:s390x. 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 ... 55491 files and directories currently installed.) 117s Preparing to unpack .../00-libpython3.13-minimal_3.13.1-2_s390x.deb ... 117s Unpacking libpython3.13-minimal:s390x (3.13.1-2) ... 117s Selecting previously unselected package python3.13-minimal. 117s Preparing to unpack .../01-python3.13-minimal_3.13.1-2_s390x.deb ... 117s Unpacking python3.13-minimal (3.13.1-2) ... 117s Selecting previously unselected package libjs-jquery. 117s Preparing to unpack .../02-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 117s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 117s Selecting previously unselected package libjs-jquery-hotkeys. 117s Preparing to unpack .../03-libjs-jquery-hotkeys_0~20130707+git2d51e3a9+dfsg-2.1_all.deb ... 117s Unpacking libjs-jquery-hotkeys (0~20130707+git2d51e3a9+dfsg-2.1) ... 117s Selecting previously unselected package m4. 117s Preparing to unpack .../04-m4_1.4.19-4build1_s390x.deb ... 117s Unpacking m4 (1.4.19-4build1) ... 117s Selecting previously unselected package autoconf. 117s Preparing to unpack .../05-autoconf_2.72-3_all.deb ... 117s Unpacking autoconf (2.72-3) ... 117s Selecting previously unselected package autotools-dev. 117s Preparing to unpack .../06-autotools-dev_20220109.1_all.deb ... 117s Unpacking autotools-dev (20220109.1) ... 117s Selecting previously unselected package automake. 117s Preparing to unpack .../07-automake_1%3a1.16.5-1.3ubuntu1_all.deb ... 117s Unpacking automake (1:1.16.5-1.3ubuntu1) ... 117s Selecting previously unselected package autopoint. 117s Preparing to unpack .../08-autopoint_0.22.5-3_all.deb ... 117s Unpacking autopoint (0.22.5-3) ... 117s Selecting previously unselected package libisl23:s390x. 117s Preparing to unpack .../09-libisl23_0.27-1_s390x.deb ... 117s Unpacking libisl23:s390x (0.27-1) ... 117s Selecting previously unselected package libmpc3:s390x. 117s Preparing to unpack .../10-libmpc3_1.3.1-1build2_s390x.deb ... 117s Unpacking libmpc3:s390x (1.3.1-1build2) ... 117s Selecting previously unselected package cpp-14-s390x-linux-gnu. 117s Preparing to unpack .../11-cpp-14-s390x-linux-gnu_14.2.0-11ubuntu1_s390x.deb ... 117s Unpacking cpp-14-s390x-linux-gnu (14.2.0-11ubuntu1) ... 117s Selecting previously unselected package cpp-14. 117s Preparing to unpack .../12-cpp-14_14.2.0-11ubuntu1_s390x.deb ... 117s Unpacking cpp-14 (14.2.0-11ubuntu1) ... 117s Selecting previously unselected package cpp-s390x-linux-gnu. 117s Preparing to unpack .../13-cpp-s390x-linux-gnu_4%3a14.1.0-2ubuntu1_s390x.deb ... 117s Unpacking cpp-s390x-linux-gnu (4:14.1.0-2ubuntu1) ... 117s Selecting previously unselected package cpp. 117s Preparing to unpack .../14-cpp_4%3a14.1.0-2ubuntu1_s390x.deb ... 117s Unpacking cpp (4:14.1.0-2ubuntu1) ... 117s Selecting previously unselected package libcc1-0:s390x. 117s Preparing to unpack .../15-libcc1-0_14.2.0-11ubuntu1_s390x.deb ... 117s Unpacking libcc1-0:s390x (14.2.0-11ubuntu1) ... 117s Selecting previously unselected package libgomp1:s390x. 117s Preparing to unpack .../16-libgomp1_14.2.0-11ubuntu1_s390x.deb ... 117s Unpacking libgomp1:s390x (14.2.0-11ubuntu1) ... 117s Selecting previously unselected package libitm1:s390x. 117s Preparing to unpack .../17-libitm1_14.2.0-11ubuntu1_s390x.deb ... 117s Unpacking libitm1:s390x (14.2.0-11ubuntu1) ... 117s Selecting previously unselected package libasan8:s390x. 117s Preparing to unpack .../18-libasan8_14.2.0-11ubuntu1_s390x.deb ... 117s Unpacking libasan8:s390x (14.2.0-11ubuntu1) ... 118s Selecting previously unselected package libubsan1:s390x. 118s Preparing to unpack .../19-libubsan1_14.2.0-11ubuntu1_s390x.deb ... 118s Unpacking libubsan1:s390x (14.2.0-11ubuntu1) ... 118s Selecting previously unselected package libgcc-14-dev:s390x. 118s Preparing to unpack .../20-libgcc-14-dev_14.2.0-11ubuntu1_s390x.deb ... 118s Unpacking libgcc-14-dev:s390x (14.2.0-11ubuntu1) ... 118s Selecting previously unselected package gcc-14-s390x-linux-gnu. 118s Preparing to unpack .../21-gcc-14-s390x-linux-gnu_14.2.0-11ubuntu1_s390x.deb ... 118s Unpacking gcc-14-s390x-linux-gnu (14.2.0-11ubuntu1) ... 118s Selecting previously unselected package gcc-14. 118s Preparing to unpack .../22-gcc-14_14.2.0-11ubuntu1_s390x.deb ... 118s Unpacking gcc-14 (14.2.0-11ubuntu1) ... 118s Selecting previously unselected package gcc-s390x-linux-gnu. 118s Preparing to unpack .../23-gcc-s390x-linux-gnu_4%3a14.1.0-2ubuntu1_s390x.deb ... 118s Unpacking gcc-s390x-linux-gnu (4:14.1.0-2ubuntu1) ... 118s Selecting previously unselected package gcc. 118s Preparing to unpack .../24-gcc_4%3a14.1.0-2ubuntu1_s390x.deb ... 118s Unpacking gcc (4:14.1.0-2ubuntu1) ... 118s Selecting previously unselected package libstdc++-14-dev:s390x. 118s Preparing to unpack .../25-libstdc++-14-dev_14.2.0-11ubuntu1_s390x.deb ... 118s Unpacking libstdc++-14-dev:s390x (14.2.0-11ubuntu1) ... 118s Selecting previously unselected package g++-14-s390x-linux-gnu. 118s Preparing to unpack .../26-g++-14-s390x-linux-gnu_14.2.0-11ubuntu1_s390x.deb ... 118s Unpacking g++-14-s390x-linux-gnu (14.2.0-11ubuntu1) ... 118s Selecting previously unselected package g++-14. 118s Preparing to unpack .../27-g++-14_14.2.0-11ubuntu1_s390x.deb ... 118s Unpacking g++-14 (14.2.0-11ubuntu1) ... 118s Selecting previously unselected package g++-s390x-linux-gnu. 118s Preparing to unpack .../28-g++-s390x-linux-gnu_4%3a14.1.0-2ubuntu1_s390x.deb ... 118s Unpacking g++-s390x-linux-gnu (4:14.1.0-2ubuntu1) ... 118s Selecting previously unselected package g++. 118s Preparing to unpack .../29-g++_4%3a14.1.0-2ubuntu1_s390x.deb ... 118s Unpacking g++ (4:14.1.0-2ubuntu1) ... 118s Selecting previously unselected package build-essential. 118s Preparing to unpack .../30-build-essential_12.10ubuntu1_s390x.deb ... 118s Unpacking build-essential (12.10ubuntu1) ... 118s Selecting previously unselected package libdebhelper-perl. 118s Preparing to unpack .../31-libdebhelper-perl_13.20ubuntu1_all.deb ... 118s Unpacking libdebhelper-perl (13.20ubuntu1) ... 118s Selecting previously unselected package libtool. 118s Preparing to unpack .../32-libtool_2.4.7-8_all.deb ... 118s Unpacking libtool (2.4.7-8) ... 118s Selecting previously unselected package dh-autoreconf. 118s Preparing to unpack .../33-dh-autoreconf_20_all.deb ... 118s Unpacking dh-autoreconf (20) ... 118s Selecting previously unselected package libarchive-zip-perl. 118s Preparing to unpack .../34-libarchive-zip-perl_1.68-1_all.deb ... 118s Unpacking libarchive-zip-perl (1.68-1) ... 118s Selecting previously unselected package libfile-stripnondeterminism-perl. 118s Preparing to unpack .../35-libfile-stripnondeterminism-perl_1.14.0-1_all.deb ... 118s Unpacking libfile-stripnondeterminism-perl (1.14.0-1) ... 118s Selecting previously unselected package dh-strip-nondeterminism. 118s Preparing to unpack .../36-dh-strip-nondeterminism_1.14.0-1_all.deb ... 118s Unpacking dh-strip-nondeterminism (1.14.0-1) ... 118s Selecting previously unselected package debugedit. 118s Preparing to unpack .../37-debugedit_1%3a5.1-1_s390x.deb ... 118s Unpacking debugedit (1:5.1-1) ... 118s Selecting previously unselected package dwz. 118s Preparing to unpack .../38-dwz_0.15-1build6_s390x.deb ... 118s Unpacking dwz (0.15-1build6) ... 118s Selecting previously unselected package gettext. 118s Preparing to unpack .../39-gettext_0.22.5-3_s390x.deb ... 118s Unpacking gettext (0.22.5-3) ... 118s Selecting previously unselected package intltool-debian. 118s Preparing to unpack .../40-intltool-debian_0.35.0+20060710.6_all.deb ... 118s Unpacking intltool-debian (0.35.0+20060710.6) ... 118s Selecting previously unselected package po-debconf. 118s Preparing to unpack .../41-po-debconf_1.0.21+nmu1_all.deb ... 118s Unpacking po-debconf (1.0.21+nmu1) ... 118s Selecting previously unselected package debhelper. 118s Preparing to unpack .../42-debhelper_13.20ubuntu1_all.deb ... 118s Unpacking debhelper (13.20ubuntu1) ... 118s Selecting previously unselected package dh-python. 118s Preparing to unpack .../43-dh-python_6.20241217_all.deb ... 118s Unpacking dh-python (6.20241217) ... 118s Selecting previously unselected package libjs-jquery-metadata. 118s Preparing to unpack .../44-libjs-jquery-metadata_12-4_all.deb ... 118s Unpacking libjs-jquery-metadata (12-4) ... 118s Selecting previously unselected package libjs-jquery-tablesorter. 118s Preparing to unpack .../45-libjs-jquery-tablesorter_1%3a2.31.3+dfsg1-4_all.deb ... 118s Unpacking libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 118s Selecting previously unselected package libjs-jquery-throttle-debounce. 118s Preparing to unpack .../46-libjs-jquery-throttle-debounce_1.1+dfsg.1-2_all.deb ... 118s Unpacking libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 118s Selecting previously unselected package libpython3.13-stdlib:s390x. 118s Preparing to unpack .../47-libpython3.13-stdlib_3.13.1-2_s390x.deb ... 118s Unpacking libpython3.13-stdlib:s390x (3.13.1-2) ... 118s Selecting previously unselected package python3-packaging. 118s Preparing to unpack .../48-python3-packaging_24.2-1_all.deb ... 118s Unpacking python3-packaging (24.2-1) ... 118s Selecting previously unselected package python3-pyproject-hooks. 118s Preparing to unpack .../49-python3-pyproject-hooks_1.2.0-1_all.deb ... 118s Unpacking python3-pyproject-hooks (1.2.0-1) ... 118s Selecting previously unselected package python3-toml. 118s Preparing to unpack .../50-python3-toml_0.10.2-1_all.deb ... 118s Unpacking python3-toml (0.10.2-1) ... 118s Selecting previously unselected package python3-wheel. 118s Preparing to unpack .../51-python3-wheel_0.45.1-1_all.deb ... 118s Unpacking python3-wheel (0.45.1-1) ... 118s Selecting previously unselected package python3-build. 118s Preparing to unpack .../52-python3-build_1.2.2-1_all.deb ... 118s Unpacking python3-build (1.2.2-1) ... 118s Selecting previously unselected package python3-installer. 119s Preparing to unpack .../53-python3-installer_0.7.0+dfsg1-3_all.deb ... 119s Unpacking python3-installer (0.7.0+dfsg1-3) ... 119s Selecting previously unselected package pybuild-plugin-pyproject. 119s Preparing to unpack .../54-pybuild-plugin-pyproject_6.20241217_all.deb ... 119s Unpacking pybuild-plugin-pyproject (6.20241217) ... 119s Selecting previously unselected package python3-multidict. 119s Preparing to unpack .../55-python3-multidict_6.1.0-1build1_s390x.deb ... 119s Unpacking python3-multidict (6.1.0-1build1) ... 119s Selecting previously unselected package python3-yarl. 119s Preparing to unpack .../56-python3-yarl_1.9.4-1_s390x.deb ... 119s Unpacking python3-yarl (1.9.4-1) ... 119s Selecting previously unselected package python3-async-timeout. 119s Preparing to unpack .../57-python3-async-timeout_5.0.1-1_all.deb ... 119s Unpacking python3-async-timeout (5.0.1-1) ... 119s Selecting previously unselected package python3-frozenlist. 119s Preparing to unpack .../58-python3-frozenlist_1.5.0-1build1_s390x.deb ... 119s Unpacking python3-frozenlist (1.5.0-1build1) ... 119s Selecting previously unselected package python3-aiosignal. 119s Preparing to unpack .../59-python3-aiosignal_1.3.1-1_all.deb ... 119s Unpacking python3-aiosignal (1.3.1-1) ... 119s Selecting previously unselected package python3-aiohttp. 119s Preparing to unpack .../60-python3-aiohttp_3.9.5-1_s390x.deb ... 119s Unpacking python3-aiohttp (3.9.5-1) ... 119s Selecting previously unselected package python3-backoff. 119s Preparing to unpack .../61-python3-backoff_2.2.1-2_all.deb ... 119s Unpacking python3-backoff (2.2.1-2) ... 119s Selecting previously unselected package python3-aiomodernforms. 119s Preparing to unpack .../62-python3-aiomodernforms_0.1.8-2_all.deb ... 119s Unpacking python3-aiomodernforms (0.1.8-2) ... 119s Selecting previously unselected package python3.13. 119s Preparing to unpack .../63-python3.13_3.13.1-2_s390x.deb ... 119s Unpacking python3.13 (3.13.1-2) ... 119s Selecting previously unselected package python3-all. 119s Preparing to unpack .../64-python3-all_3.12.8-1_s390x.deb ... 119s Unpacking python3-all (3.12.8-1) ... 119s Selecting previously unselected package python3-async-generator. 119s Preparing to unpack .../65-python3-async-generator_1.10-4_all.deb ... 119s Unpacking python3-async-generator (1.10-4) ... 119s Selecting previously unselected package python3-iniconfig. 119s Preparing to unpack .../66-python3-iniconfig_1.1.1-2_all.deb ... 119s Unpacking python3-iniconfig (1.1.1-2) ... 119s Selecting previously unselected package python3-pluggy. 119s Preparing to unpack .../67-python3-pluggy_1.5.0-1_all.deb ... 119s Unpacking python3-pluggy (1.5.0-1) ... 119s Selecting previously unselected package python3-pytest. 119s Preparing to unpack .../68-python3-pytest_8.3.3-1_all.deb ... 119s Unpacking python3-pytest (8.3.3-1) ... 119s Selecting previously unselected package python3-pytest-asyncio. 119s Preparing to unpack .../69-python3-pytest-asyncio_0.24.0a1-1_all.deb ... 119s Unpacking python3-pytest-asyncio (0.24.0a1-1) ... 119s Selecting previously unselected package python3-aresponses. 119s Preparing to unpack .../70-python3-aresponses_3.0.0-2_all.deb ... 119s Unpacking python3-aresponses (3.0.0-2) ... 119s Selecting previously unselected package python3-coverage. 119s Preparing to unpack .../71-python3-coverage_7.4.4+dfsg1-0ubuntu3_s390x.deb ... 119s Unpacking python3-coverage (7.4.4+dfsg1-0ubuntu3) ... 119s Selecting previously unselected package python3-mypy-extensions. 119s Preparing to unpack .../72-python3-mypy-extensions_1.0.0-1_all.deb ... 119s Unpacking python3-mypy-extensions (1.0.0-1) ... 119s Selecting previously unselected package python3-psutil. 119s Preparing to unpack .../73-python3-psutil_5.9.8-2build3_s390x.deb ... 119s Unpacking python3-psutil (5.9.8-2build3) ... 119s Selecting previously unselected package python3-mypy. 119s Preparing to unpack .../74-python3-mypy_1.14.0-1_s390x.deb ... 119s Unpacking python3-mypy (1.14.0-1) ... 119s Selecting previously unselected package python3-pip. 119s Preparing to unpack .../75-python3-pip_24.3.1+dfsg-1_all.deb ... 119s Unpacking python3-pip (24.3.1+dfsg-1) ... 119s Selecting previously unselected package libjs-jquery-isonscreen. 119s Preparing to unpack .../76-libjs-jquery-isonscreen_1.2.0-1.1_all.deb ... 119s Unpacking libjs-jquery-isonscreen (1.2.0-1.1) ... 119s Selecting previously unselected package python3-pytest-cov. 119s Preparing to unpack .../77-python3-pytest-cov_5.0.0-1_all.deb ... 119s Unpacking python3-pytest-cov (5.0.0-1) ... 119s Selecting previously unselected package openstack-pkg-tools. 119s Preparing to unpack .../78-openstack-pkg-tools_123ubuntu2_all.deb ... 119s Unpacking openstack-pkg-tools (123ubuntu2) ... 119s Setting up dh-python (6.20241217) ... 119s Setting up python3-iniconfig (1.1.1-2) ... 119s Setting up python3-async-generator (1.10-4) ... 120s Setting up libarchive-zip-perl (1.68-1) ... 120s Setting up python3-mypy-extensions (1.0.0-1) ... 120s Setting up libdebhelper-perl (13.20ubuntu1) ... 120s Setting up m4 (1.4.19-4build1) ... 120s Setting up libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 120s Setting up libgomp1:s390x (14.2.0-11ubuntu1) ... 120s Setting up python3-wheel (0.45.1-1) ... 120s Setting up python3-psutil (5.9.8-2build3) ... 120s Setting up python3-multidict (6.1.0-1build1) ... 120s Setting up python3-frozenlist (1.5.0-1build1) ... 121s Setting up python3-aiosignal (1.3.1-1) ... 121s Setting up python3-async-timeout (5.0.1-1) ... 121s Setting up libpython3.13-minimal:s390x (3.13.1-2) ... 121s Setting up autotools-dev (20220109.1) ... 121s Setting up python3-packaging (24.2-1) ... 121s Setting up python3-pyproject-hooks (1.2.0-1) ... 121s Setting up libmpc3:s390x (1.3.1-1build2) ... 121s Setting up python3-mypy (1.14.0-1) ... 123s Setting up autopoint (0.22.5-3) ... 123s Setting up python3-pip (24.3.1+dfsg-1) ... 125s Setting up python3-toml (0.10.2-1) ... 125s Setting up python3-installer (0.7.0+dfsg1-3) ... 125s Setting up autoconf (2.72-3) ... 125s Setting up python3-pluggy (1.5.0-1) ... 125s Setting up libubsan1:s390x (14.2.0-11ubuntu1) ... 125s Setting up dwz (0.15-1build6) ... 125s Setting up libasan8:s390x (14.2.0-11ubuntu1) ... 125s Setting up python3-backoff (2.2.1-2) ... 125s Setting up debugedit (1:5.1-1) ... 125s Setting up python3.13-minimal (3.13.1-2) ... 126s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 126s Setting up libjs-jquery-hotkeys (0~20130707+git2d51e3a9+dfsg-2.1) ... 126s Setting up libisl23:s390x (0.27-1) ... 126s Setting up python3-build (1.2.2-1) ... 126s Setting up python3-yarl (1.9.4-1) ... 126s Setting up libpython3.13-stdlib:s390x (3.13.1-2) ... 126s Setting up libcc1-0:s390x (14.2.0-11ubuntu1) ... 126s Setting up libitm1:s390x (14.2.0-11ubuntu1) ... 126s Setting up automake (1:1.16.5-1.3ubuntu1) ... 126s update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode 126s Setting up libfile-stripnondeterminism-perl (1.14.0-1) ... 126s Setting up gettext (0.22.5-3) ... 126s Setting up python3.13 (3.13.1-2) ... 127s Setting up pybuild-plugin-pyproject (6.20241217) ... 127s Setting up python3-pytest (8.3.3-1) ... 127s Setting up python3-aiohttp (3.9.5-1) ... 128s Setting up python3-all (3.12.8-1) ... 128s Setting up python3-coverage (7.4.4+dfsg1-0ubuntu3) ... 128s Setting up python3-aiomodernforms (0.1.8-2) ... 128s Setting up intltool-debian (0.35.0+20060710.6) ... 128s Setting up libjs-jquery-metadata (12-4) ... 128s Setting up libjs-jquery-isonscreen (1.2.0-1.1) ... 128s Setting up cpp-14-s390x-linux-gnu (14.2.0-11ubuntu1) ... 128s Setting up cpp-14 (14.2.0-11ubuntu1) ... 128s Setting up python3-pytest-asyncio (0.24.0a1-1) ... 128s Setting up dh-strip-nondeterminism (1.14.0-1) ... 128s Setting up libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 128s Setting up libgcc-14-dev:s390x (14.2.0-11ubuntu1) ... 128s Setting up libstdc++-14-dev:s390x (14.2.0-11ubuntu1) ... 128s Setting up python3-aresponses (3.0.0-2) ... 129s Setting up cpp-s390x-linux-gnu (4:14.1.0-2ubuntu1) ... 129s Setting up po-debconf (1.0.21+nmu1) ... 129s Setting up python3-pytest-cov (5.0.0-1) ... 129s Setting up openstack-pkg-tools (123ubuntu2) ... 129s Setting up gcc-14-s390x-linux-gnu (14.2.0-11ubuntu1) ... 129s Setting up gcc-s390x-linux-gnu (4:14.1.0-2ubuntu1) ... 129s Setting up g++-14-s390x-linux-gnu (14.2.0-11ubuntu1) ... 129s Setting up cpp (4:14.1.0-2ubuntu1) ... 129s Setting up g++-s390x-linux-gnu (4:14.1.0-2ubuntu1) ... 129s Setting up gcc-14 (14.2.0-11ubuntu1) ... 129s Setting up g++-14 (14.2.0-11ubuntu1) ... 129s Setting up libtool (2.4.7-8) ... 129s Setting up gcc (4:14.1.0-2ubuntu1) ... 129s Setting up dh-autoreconf (20) ... 129s Setting up g++ (4:14.1.0-2ubuntu1) ... 129s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 129s Setting up build-essential (12.10ubuntu1) ... 129s Setting up debhelper (13.20ubuntu1) ... 129s Processing triggers for man-db (2.13.0-1) ... 129s Processing triggers for install-info (7.1.1-1) ... 129s Processing triggers for libc-bin (2.40-4ubuntu1) ... 129s Processing triggers for systemd (257-2ubuntu1) ... 130s autopkgtest [17:15:07]: test pybuild-autopkgtest: pybuild-autopkgtest 130s autopkgtest [17:15:07]: test pybuild-autopkgtest: [----------------------- 130s make: pyversions: No such file or directory 131s py3versions: no X-Python3-Version in control file, using supported versions 131s pybuild-autopkgtest 131s I: pybuild base:311: cd /tmp/autopkgtest.cLG5El/autopkgtest_tmp/build; python3.13 -m pytest -v 131s /usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. 131s The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" 131s 131s warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) 131s ============================= test session starts ============================== 131s platform linux -- Python 3.13.1, pytest-8.3.3, pluggy-1.5.0 -- /usr/bin/python3.13 131s cachedir: .pytest_cache 131s rootdir: /tmp/autopkgtest.cLG5El/autopkgtest_tmp/build 131s configfile: pytest.ini 131s testpaths: tests 131s plugins: aresponses-3.0.0, typeguard-4.4.1, cov-5.0.0, asyncio-0.24.0a1 131s asyncio: mode=Mode.STRICT, default_loop_scope=None 131s collecting ... collected 19 items 131s 131s tests/test_aiomodernforms.py::test_basic_status FAILED [ 5%] 131s tests/test_aiomodernforms.py::test_command FAILED [ 10%] 131s tests/test_aiomodernforms.py::test_light FAILED [ 15%] 131s tests/test_aiomodernforms.py::test_light_sleep_datetime FAILED [ 21%] 131s tests/test_aiomodernforms.py::test_light_sleep_int FAILED [ 26%] 131s tests/test_aiomodernforms.py::test_light_sleep_clear FAILED [ 31%] 131s tests/test_aiomodernforms.py::test_fan FAILED [ 36%] 131s tests/test_aiomodernforms.py::test_fan_sleep_datetime FAILED [ 42%] 131s tests/test_aiomodernforms.py::test_fan_sleep_int FAILED [ 47%] 131s tests/test_aiomodernforms.py::test_fan_sleep_clear FAILED [ 52%] 131s tests/test_aiomodernforms.py::test_away FAILED [ 57%] 131s tests/test_aiomodernforms.py::test_adaptive_learning FAILED [ 63%] 131s tests/test_aiomodernforms.py::test_invalid_setting FAILED [ 68%] 131s tests/test_aiomodernforms.py::test_connection_error FAILED [ 73%] 131s tests/test_aiomodernforms.py::test_server_error FAILED [ 78%] 131s tests/test_aiomodernforms.py::test_reboot FAILED [ 84%] 131s tests/test_aiomodernforms.py::test_status_not_initialized_response PASSED [ 89%] 131s tests/test_aiomodernforms.py::test_info_not_initialized_response PASSED [ 94%] 131s tests/test_aiomodernforms.py::test_empty_response FAILED [100%] 131s 131s =================================== FAILURES =================================== 131s ______________________________ test_basic_status _______________________________ 131s 131s aresponses = 131s 131s @pytest.mark.asyncio 131s async def test_basic_status(aresponses): 131s """Test JSON response is handled correctly.""" 131s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 131s aresponses.add( 131s "fan.local", 131s "/mf", 131s "POST", 131s response=basic_response, 131s repeat=2, 131s ) 131s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 131s > await device.update() 131s 131s tests/test_aiomodernforms.py:79: 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 131s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s 131s self = 131s commands = {'queryStaticShadowData': True} 131s 131s @backoff.on_exception( 131s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 131s ) 131s async def _request(self, commands: Optional[dict] = None) -> Any: 131s """Handle a request to a Modern Forms Fan device.""" 131s scheme = "https" if self._tls else "http" 131s url = URL.build( 131s scheme=scheme, 131s host=self._host, 131s port=self._port, 131s path=self._base_path, 131s ) 131s 131s auth = None 131s if self._username and self._password: 131s auth = aiohttp.BasicAuth(self._username, self._password) 131s 131s headers = { 131s "User-Agent": self._user_agent, 131s "Accept": "application/json", 131s } 131s 131s if self._session is None: 131s self._session = aiohttp.ClientSession() 131s self._close_session = True 131s 131s # If updating the state, always request for a state response 131s if commands is None: 131s commands = {COMMAND_QUERY_STATUS: True} 131s 131s try: 131s > with async_timeout.timeout(self._request_timeout): 131s E TypeError: 'Timeout' object does not support the context manager protocol 131s 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 131s _________________________________ test_command _________________________________ 131s 131s aresponses = 131s 131s @pytest.mark.asyncio 131s async def test_command(aresponses): 131s """Test to make sure setting lights works.""" 131s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 131s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 131s 131s async def evaluate_request(request): 131s data = await request.json() 131s assert aiomodernforms.COMMAND_LIGHT_POWER in data 131s modified_response = basic_response.copy() 131s modified_response[STATE_LIGHT_POWER] = data[aiomodernforms.COMMAND_LIGHT_POWER] 131s return aresponses.Response( 131s status=200, 131s content_type="application/json", 131s text=json.dumps(modified_response), 131s ) 131s 131s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 131s 131s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 131s > await device.update() 131s 131s tests/test_aiomodernforms.py:108: 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 131s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s 131s self = 131s commands = {'queryStaticShadowData': True} 131s 131s @backoff.on_exception( 131s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 131s ) 131s async def _request(self, commands: Optional[dict] = None) -> Any: 131s """Handle a request to a Modern Forms Fan device.""" 131s scheme = "https" if self._tls else "http" 131s url = URL.build( 131s scheme=scheme, 131s host=self._host, 131s port=self._port, 131s path=self._base_path, 131s ) 131s 131s auth = None 131s if self._username and self._password: 131s auth = aiohttp.BasicAuth(self._username, self._password) 131s 131s headers = { 131s "User-Agent": self._user_agent, 131s "Accept": "application/json", 131s } 131s 131s if self._session is None: 131s self._session = aiohttp.ClientSession() 131s self._close_session = True 131s 131s # If updating the state, always request for a state response 131s if commands is None: 131s commands = {COMMAND_QUERY_STATUS: True} 131s 131s try: 131s > with async_timeout.timeout(self._request_timeout): 131s E TypeError: 'Timeout' object does not support the context manager protocol 131s 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 131s __________________________________ test_light __________________________________ 131s 131s aresponses = 131s 131s @pytest.mark.asyncio 131s async def test_light(aresponses): 131s """Test to make sure setting lights works.""" 131s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 131s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 131s 131s async def evaluate_request(request): 131s data = await request.json() 131s assert aiomodernforms.COMMAND_LIGHT_POWER in data 131s assert aiomodernforms.COMMAND_LIGHT_BRIGHTNESS in data 131s assert aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER in data 131s modified_response = basic_response.copy() 131s modified_response[STATE_LIGHT_POWER] = data[aiomodernforms.COMMAND_LIGHT_POWER] 131s modified_response[STATE_LIGHT_BRIGHTNESS] = data[ 131s aiomodernforms.COMMAND_LIGHT_BRIGHTNESS 131s ] 131s modified_response[STATE_LIGHT_SLEEP_TIMER] = data[ 131s aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER 131s ] 131s return aresponses.Response( 131s status=200, 131s content_type="application/json", 131s text=json.dumps(modified_response), 131s ) 131s 131s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 131s 131s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 131s > await device.update() 131s 131s tests/test_aiomodernforms.py:143: 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 131s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s 131s self = 131s commands = {'queryStaticShadowData': True} 131s 131s @backoff.on_exception( 131s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 131s ) 131s async def _request(self, commands: Optional[dict] = None) -> Any: 131s """Handle a request to a Modern Forms Fan device.""" 131s scheme = "https" if self._tls else "http" 131s url = URL.build( 131s scheme=scheme, 131s host=self._host, 131s port=self._port, 131s path=self._base_path, 131s ) 131s 131s auth = None 131s if self._username and self._password: 131s auth = aiohttp.BasicAuth(self._username, self._password) 131s 131s headers = { 131s "User-Agent": self._user_agent, 131s "Accept": "application/json", 131s } 131s 131s if self._session is None: 131s self._session = aiohttp.ClientSession() 131s self._close_session = True 131s 131s # If updating the state, always request for a state response 131s if commands is None: 131s commands = {COMMAND_QUERY_STATUS: True} 131s 131s try: 131s > with async_timeout.timeout(self._request_timeout): 131s E TypeError: 'Timeout' object does not support the context manager protocol 131s 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 131s __________________________ test_light_sleep_datetime ___________________________ 131s 131s aresponses = 131s 131s @pytest.mark.asyncio 131s async def test_light_sleep_datetime(aresponses): 131s """Test to make sure setting light sleep works.""" 131s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 131s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 131s 131s async def evaluate_request(request): 131s data = await request.json() 131s assert aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER in data 131s modified_response = basic_response.copy() 131s modified_response[STATE_LIGHT_SLEEP_TIMER] = data[ 131s aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER 131s ] 131s return aresponses.Response( 131s status=200, 131s content_type="application/json", 131s text=json.dumps(modified_response), 131s ) 131s 131s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 131s 131s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 131s sleep_time = datetime.now() + timedelta(minutes=2) 131s > await device.light( 131s sleep=sleep_time, 131s ) 131s 131s tests/test_aiomodernforms.py:180: 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:251: in light 131s await self.request(commands=commands) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:178: in request 131s await self.update() 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 131s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s 131s self = 131s commands = {'queryStaticShadowData': True} 131s 131s @backoff.on_exception( 131s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 131s ) 131s async def _request(self, commands: Optional[dict] = None) -> Any: 131s """Handle a request to a Modern Forms Fan device.""" 131s scheme = "https" if self._tls else "http" 131s url = URL.build( 131s scheme=scheme, 131s host=self._host, 131s port=self._port, 131s path=self._base_path, 131s ) 131s 131s auth = None 131s if self._username and self._password: 131s auth = aiohttp.BasicAuth(self._username, self._password) 131s 131s headers = { 131s "User-Agent": self._user_agent, 131s "Accept": "application/json", 131s } 131s 131s if self._session is None: 131s self._session = aiohttp.ClientSession() 131s self._close_session = True 131s 131s # If updating the state, always request for a state response 131s if commands is None: 131s commands = {COMMAND_QUERY_STATUS: True} 131s 131s try: 131s > with async_timeout.timeout(self._request_timeout): 131s E TypeError: 'Timeout' object does not support the context manager protocol 131s 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 131s _____________________________ test_light_sleep_int _____________________________ 131s 131s aresponses = 131s 131s @pytest.mark.asyncio 131s async def test_light_sleep_int(aresponses): 131s """Test to make sure setting light sleep works.""" 131s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 131s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 131s 131s async def evaluate_request(request): 131s data = await request.json() 131s assert aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER in data 131s modified_response = basic_response.copy() 131s modified_response[STATE_LIGHT_SLEEP_TIMER] = data[ 131s aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER 131s ] 131s return aresponses.Response( 131s status=200, 131s content_type="application/json", 131s text=json.dumps(modified_response), 131s ) 131s 131s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 131s 131s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 131s sleep_time = datetime.now() + timedelta(seconds=120) 131s > await device.light( 131s sleep=120, 131s ) 131s 131s tests/test_aiomodernforms.py:209: 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:251: in light 131s await self.request(commands=commands) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:178: in request 131s await self.update() 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 131s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s 131s self = 131s commands = {'queryStaticShadowData': True} 131s 131s @backoff.on_exception( 131s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 131s ) 131s async def _request(self, commands: Optional[dict] = None) -> Any: 131s """Handle a request to a Modern Forms Fan device.""" 131s scheme = "https" if self._tls else "http" 131s url = URL.build( 131s scheme=scheme, 131s host=self._host, 131s port=self._port, 131s path=self._base_path, 131s ) 131s 131s auth = None 131s if self._username and self._password: 131s auth = aiohttp.BasicAuth(self._username, self._password) 131s 131s headers = { 131s "User-Agent": self._user_agent, 131s "Accept": "application/json", 131s } 131s 131s if self._session is None: 131s self._session = aiohttp.ClientSession() 131s self._close_session = True 131s 131s # If updating the state, always request for a state response 131s if commands is None: 131s commands = {COMMAND_QUERY_STATUS: True} 131s 131s try: 131s > with async_timeout.timeout(self._request_timeout): 131s E TypeError: 'Timeout' object does not support the context manager protocol 131s 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 131s ____________________________ test_light_sleep_clear ____________________________ 131s 131s aresponses = 131s 131s @pytest.mark.asyncio 131s async def test_light_sleep_clear(aresponses): 131s """Test to make sure setting light sleep works.""" 131s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 131s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 131s 131s async def evaluate_request(request): 131s data = await request.json() 131s assert aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER in data 131s modified_response = basic_response.copy() 131s modified_response[STATE_LIGHT_SLEEP_TIMER] = data[ 131s aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER 131s ] 131s return aresponses.Response( 131s status=200, 131s content_type="application/json", 131s text=json.dumps(modified_response), 131s ) 131s 131s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 131s 131s # check to clear timer 131s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 131s > await device.light( 131s sleep=0, 131s ) 131s 131s tests/test_aiomodernforms.py:238: 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:251: in light 131s await self.request(commands=commands) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:178: in request 131s await self.update() 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 131s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s 131s self = 131s commands = {'queryStaticShadowData': True} 131s 131s @backoff.on_exception( 131s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 131s ) 131s async def _request(self, commands: Optional[dict] = None) -> Any: 131s """Handle a request to a Modern Forms Fan device.""" 131s scheme = "https" if self._tls else "http" 131s url = URL.build( 131s scheme=scheme, 131s host=self._host, 131s port=self._port, 131s path=self._base_path, 131s ) 131s 131s auth = None 131s if self._username and self._password: 131s auth = aiohttp.BasicAuth(self._username, self._password) 131s 131s headers = { 131s "User-Agent": self._user_agent, 131s "Accept": "application/json", 131s } 131s 131s if self._session is None: 131s self._session = aiohttp.ClientSession() 131s self._close_session = True 131s 131s # If updating the state, always request for a state response 131s if commands is None: 131s commands = {COMMAND_QUERY_STATUS: True} 131s 131s try: 131s > with async_timeout.timeout(self._request_timeout): 131s E TypeError: 'Timeout' object does not support the context manager protocol 131s 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 131s ___________________________________ test_fan ___________________________________ 131s 131s aresponses = 131s 131s @pytest.mark.asyncio 131s async def test_fan(aresponses): 131s """Test to make sure setting fan works.""" 131s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 131s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 131s 131s async def evaluate_request(request): 131s data = await request.json() 131s assert aiomodernforms.COMMAND_FAN_POWER in data 131s assert aiomodernforms.COMMAND_FAN_SPEED in data 131s assert aiomodernforms.COMMAND_FAN_DIRECTION in data 131s assert aiomodernforms.COMMAND_FAN_SLEEP_TIMER in data 131s modified_response = basic_response.copy() 131s modified_response[STATE_FAN_POWER] = data[aiomodernforms.COMMAND_FAN_POWER] 131s modified_response[STATE_FAN_SPEED] = data[aiomodernforms.COMMAND_FAN_SPEED] 131s modified_response[STATE_FAN_DIRECTION] = data[ 131s aiomodernforms.COMMAND_FAN_DIRECTION 131s ] 131s modified_response[STATE_FAN_SLEEP_TIMER] = data[ 131s aiomodernforms.COMMAND_FAN_SLEEP_TIMER 131s ] 131s return aresponses.Response( 131s status=200, 131s content_type="application/json", 131s text=json.dumps(modified_response), 131s ) 131s 131s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 131s 131s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 131s > await device.update() 131s 131s tests/test_aiomodernforms.py:274: 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 131s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s 131s self = 131s commands = {'queryStaticShadowData': True} 131s 131s @backoff.on_exception( 131s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 131s ) 131s async def _request(self, commands: Optional[dict] = None) -> Any: 131s """Handle a request to a Modern Forms Fan device.""" 131s scheme = "https" if self._tls else "http" 131s url = URL.build( 131s scheme=scheme, 131s host=self._host, 131s port=self._port, 131s path=self._base_path, 131s ) 131s 131s auth = None 131s if self._username and self._password: 131s auth = aiohttp.BasicAuth(self._username, self._password) 131s 131s headers = { 131s "User-Agent": self._user_agent, 131s "Accept": "application/json", 131s } 131s 131s if self._session is None: 131s self._session = aiohttp.ClientSession() 131s self._close_session = True 131s 131s # If updating the state, always request for a state response 131s if commands is None: 131s commands = {COMMAND_QUERY_STATUS: True} 131s 131s try: 131s > with async_timeout.timeout(self._request_timeout): 131s E TypeError: 'Timeout' object does not support the context manager protocol 131s 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 131s ___________________________ test_fan_sleep_datetime ____________________________ 131s 131s aresponses = 131s 131s @pytest.mark.asyncio 131s async def test_fan_sleep_datetime(aresponses): 131s """Test to make sure setting light sleep works.""" 131s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 131s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 131s 131s async def evaluate_request(request): 131s data = await request.json() 131s assert aiomodernforms.COMMAND_FAN_SLEEP_TIMER in data 131s modified_response = basic_response.copy() 131s modified_response[STATE_FAN_SLEEP_TIMER] = data[ 131s aiomodernforms.COMMAND_FAN_SLEEP_TIMER 131s ] 131s return aresponses.Response( 131s status=200, 131s content_type="application/json", 131s text=json.dumps(modified_response), 131s ) 131s 131s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 131s 131s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 131s sleep_time = datetime.now() + timedelta(minutes=2) 131s > await device.fan( 131s sleep=sleep_time, 131s ) 131s 131s tests/test_aiomodernforms.py:311: 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:313: in fan 131s await self.request(commands=commands) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:178: in request 131s await self.update() 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 131s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s 131s self = 131s commands = {'queryStaticShadowData': True} 131s 131s @backoff.on_exception( 131s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 131s ) 131s async def _request(self, commands: Optional[dict] = None) -> Any: 131s """Handle a request to a Modern Forms Fan device.""" 131s scheme = "https" if self._tls else "http" 131s url = URL.build( 131s scheme=scheme, 131s host=self._host, 131s port=self._port, 131s path=self._base_path, 131s ) 131s 131s auth = None 131s if self._username and self._password: 131s auth = aiohttp.BasicAuth(self._username, self._password) 131s 131s headers = { 131s "User-Agent": self._user_agent, 131s "Accept": "application/json", 131s } 131s 131s if self._session is None: 131s self._session = aiohttp.ClientSession() 131s self._close_session = True 131s 131s # If updating the state, always request for a state response 131s if commands is None: 131s commands = {COMMAND_QUERY_STATUS: True} 131s 131s try: 131s > with async_timeout.timeout(self._request_timeout): 131s E TypeError: 'Timeout' object does not support the context manager protocol 131s 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 131s ______________________________ test_fan_sleep_int ______________________________ 131s 131s aresponses = 131s 131s @pytest.mark.asyncio 131s async def test_fan_sleep_int(aresponses): 131s """Test to make sure setting light sleep works.""" 131s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 131s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 131s 131s async def evaluate_request(request): 131s data = await request.json() 131s assert aiomodernforms.COMMAND_FAN_SLEEP_TIMER in data 131s modified_response = basic_response.copy() 131s modified_response[STATE_FAN_SLEEP_TIMER] = data[ 131s aiomodernforms.COMMAND_FAN_SLEEP_TIMER 131s ] 131s return aresponses.Response( 131s status=200, 131s content_type="application/json", 131s text=json.dumps(modified_response), 131s ) 131s 131s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 131s 131s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 131s sleep_time = datetime.now() + timedelta(seconds=120) 131s > await device.fan( 131s sleep=120, 131s ) 131s 131s tests/test_aiomodernforms.py:340: 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:313: in fan 131s await self.request(commands=commands) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:178: in request 131s await self.update() 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 131s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s 131s self = 131s commands = {'queryStaticShadowData': True} 131s 131s @backoff.on_exception( 131s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 131s ) 131s async def _request(self, commands: Optional[dict] = None) -> Any: 131s """Handle a request to a Modern Forms Fan device.""" 131s scheme = "https" if self._tls else "http" 131s url = URL.build( 131s scheme=scheme, 131s host=self._host, 131s port=self._port, 131s path=self._base_path, 131s ) 131s 131s auth = None 131s if self._username and self._password: 131s auth = aiohttp.BasicAuth(self._username, self._password) 131s 131s headers = { 131s "User-Agent": self._user_agent, 131s "Accept": "application/json", 131s } 131s 131s if self._session is None: 131s self._session = aiohttp.ClientSession() 131s self._close_session = True 131s 131s # If updating the state, always request for a state response 131s if commands is None: 131s commands = {COMMAND_QUERY_STATUS: True} 131s 131s try: 131s > with async_timeout.timeout(self._request_timeout): 131s E TypeError: 'Timeout' object does not support the context manager protocol 131s 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 131s _____________________________ test_fan_sleep_clear _____________________________ 131s 131s aresponses = 131s 131s @pytest.mark.asyncio 131s async def test_fan_sleep_clear(aresponses): 131s """Test to make sure setting light sleep works.""" 131s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 131s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 131s 131s async def evaluate_request(request): 131s data = await request.json() 131s assert aiomodernforms.COMMAND_FAN_SLEEP_TIMER in data 131s modified_response = basic_response.copy() 131s modified_response[STATE_FAN_SLEEP_TIMER] = data[ 131s aiomodernforms.COMMAND_FAN_SLEEP_TIMER 131s ] 131s return aresponses.Response( 131s status=200, 131s content_type="application/json", 131s text=json.dumps(modified_response), 131s ) 131s 131s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 131s 131s # check to clear timer 131s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 131s > await device.fan( 131s sleep=0, 131s ) 131s 131s tests/test_aiomodernforms.py:369: 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:313: in fan 131s await self.request(commands=commands) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:178: in request 131s await self.update() 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 131s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s 131s self = 131s commands = {'queryStaticShadowData': True} 131s 131s @backoff.on_exception( 131s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 131s ) 131s async def _request(self, commands: Optional[dict] = None) -> Any: 131s """Handle a request to a Modern Forms Fan device.""" 131s scheme = "https" if self._tls else "http" 131s url = URL.build( 131s scheme=scheme, 131s host=self._host, 131s port=self._port, 131s path=self._base_path, 131s ) 131s 131s auth = None 131s if self._username and self._password: 131s auth = aiohttp.BasicAuth(self._username, self._password) 131s 131s headers = { 131s "User-Agent": self._user_agent, 131s "Accept": "application/json", 131s } 131s 131s if self._session is None: 131s self._session = aiohttp.ClientSession() 131s self._close_session = True 131s 131s # If updating the state, always request for a state response 131s if commands is None: 131s commands = {COMMAND_QUERY_STATUS: True} 131s 131s try: 131s > with async_timeout.timeout(self._request_timeout): 131s E TypeError: 'Timeout' object does not support the context manager protocol 131s 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 131s __________________________________ test_away ___________________________________ 131s 131s aresponses = 131s 131s @pytest.mark.asyncio 131s async def test_away(aresponses): 131s """Test to make sure setting away mode works.""" 131s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 131s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 131s 131s async def evaluate_request(request): 131s data = await request.json() 131s assert aiomodernforms.COMMAND_AWAY_MODE in data 131s modified_response = basic_response.copy() 131s modified_response[STATE_AWAY_MODE] = data[aiomodernforms.COMMAND_AWAY_MODE] 131s return aresponses.Response( 131s status=200, 131s content_type="application/json", 131s text=json.dumps(modified_response), 131s ) 131s 131s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 131s 131s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 131s > await device.update() 131s 131s tests/test_aiomodernforms.py:395: 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 131s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s 131s self = 131s commands = {'queryStaticShadowData': True} 131s 131s @backoff.on_exception( 131s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 131s ) 131s async def _request(self, commands: Optional[dict] = None) -> Any: 131s """Handle a request to a Modern Forms Fan device.""" 131s scheme = "https" if self._tls else "http" 131s url = URL.build( 131s scheme=scheme, 131s host=self._host, 131s port=self._port, 131s path=self._base_path, 131s ) 131s 131s auth = None 131s if self._username and self._password: 131s auth = aiohttp.BasicAuth(self._username, self._password) 131s 131s headers = { 131s "User-Agent": self._user_agent, 131s "Accept": "application/json", 131s } 131s 131s if self._session is None: 131s self._session = aiohttp.ClientSession() 131s self._close_session = True 131s 131s # If updating the state, always request for a state response 131s if commands is None: 131s commands = {COMMAND_QUERY_STATUS: True} 131s 131s try: 131s > with async_timeout.timeout(self._request_timeout): 131s E TypeError: 'Timeout' object does not support the context manager protocol 131s 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 131s ____________________________ test_adaptive_learning ____________________________ 131s 131s aresponses = 131s 131s @pytest.mark.asyncio 131s async def test_adaptive_learning(aresponses): 131s """Test to make sure setting adaptive learning mode works.""" 131s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 131s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 131s 131s async def evaluate_request(request): 131s data = await request.json() 131s assert aiomodernforms.COMMAND_ADAPTIVE_LEARNING in data 131s modified_response = basic_response.copy() 131s modified_response[STATE_ADAPTIVE_LEARNING] = data[ 131s aiomodernforms.COMMAND_ADAPTIVE_LEARNING 131s ] 131s return aresponses.Response( 131s status=200, 131s content_type="application/json", 131s text=json.dumps(modified_response), 131s ) 131s 131s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 131s 131s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 131s > await device.update() 131s 131s tests/test_aiomodernforms.py:422: 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 131s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s 131s self = 131s commands = {'queryStaticShadowData': True} 131s 131s @backoff.on_exception( 131s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 131s ) 131s async def _request(self, commands: Optional[dict] = None) -> Any: 131s """Handle a request to a Modern Forms Fan device.""" 131s scheme = "https" if self._tls else "http" 131s url = URL.build( 131s scheme=scheme, 131s host=self._host, 131s port=self._port, 131s path=self._base_path, 131s ) 131s 131s auth = None 131s if self._username and self._password: 131s auth = aiohttp.BasicAuth(self._username, self._password) 131s 131s headers = { 131s "User-Agent": self._user_agent, 131s "Accept": "application/json", 131s } 131s 131s if self._session is None: 131s self._session = aiohttp.ClientSession() 131s self._close_session = True 131s 131s # If updating the state, always request for a state response 131s if commands is None: 131s commands = {COMMAND_QUERY_STATUS: True} 131s 131s try: 131s > with async_timeout.timeout(self._request_timeout): 131s E TypeError: 'Timeout' object does not support the context manager protocol 131s 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 131s _____________________________ test_invalid_setting _____________________________ 131s 131s aresponses = 131s 131s @pytest.mark.asyncio 131s async def test_invalid_setting(aresponses): 131s """Test to make sure setting invalid settings are rejected.""" 131s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 131s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 131s 131s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 131s > await device.update() 131s 131s tests/test_aiomodernforms.py:434: 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 131s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 131s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 131s ret = await target(*args, **kwargs) 131s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 131s 131s self = 131s commands = {'queryStaticShadowData': True} 131s 131s @backoff.on_exception( 131s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 131s ) 131s async def _request(self, commands: Optional[dict] = None) -> Any: 131s """Handle a request to a Modern Forms Fan device.""" 131s scheme = "https" if self._tls else "http" 131s url = URL.build( 131s scheme=scheme, 131s host=self._host, 131s port=self._port, 131s path=self._base_path, 131s ) 131s 131s auth = None 131s if self._username and self._password: 131s auth = aiohttp.BasicAuth(self._username, self._password) 131s 131s headers = { 131s "User-Agent": self._user_agent, 131s "Accept": "application/json", 131s } 131s 131s if self._session is None: 131s self._session = aiohttp.ClientSession() 131s self._close_session = True 131s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s ____________________________ test_connection_error _____________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_connection_error(aresponses): 132s """Test to make validate proper connection error handling.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s with pytest.raises(aiomodernforms.ModernFormsConnectionError): 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.update() 132s 132s tests/test_aiomodernforms.py:502: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s ______________________________ test_server_error _______________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_server_error(aresponses): 132s """Test to make validate proper server error handling.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add( 132s "fan.local", 132s "/mf", 132s "POST", 132s response=aresponses.Response(text="error", status=500), 132s ) 132s 132s with pytest.raises(aiomodernforms.ModernFormsError): 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.update() 132s 132s tests/test_aiomodernforms.py:518: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s _________________________________ test_reboot __________________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_reboot(aresponses): 132s """Test how reboot is handled.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 132s 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.update() 132s 132s tests/test_aiomodernforms.py:528: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s _____________________________ test_empty_response ______________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_empty_response(aresponses): 132s """Test for an Empty Response.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s 132s async def send_empty_state(request): 132s await request.json() 132s return aresponses.Response( 132s status=200, 132s content_type="application/json", 132s text="{}", 132s ) 132s 132s aresponses.add("fan.local", "/mf", "POST", response=send_empty_state) 132s with pytest.raises(ModernFormsConnectionError): 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.update() 132s 132s tests/test_aiomodernforms.py:568: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s =========================== short test summary info ============================ 132s FAILED tests/test_aiomodernforms.py::test_basic_status - TypeError: 'Timeout'... 132s FAILED tests/test_aiomodernforms.py::test_command - TypeError: 'Timeout' obje... 132s FAILED tests/test_aiomodernforms.py::test_light - TypeError: 'Timeout' object... 132s FAILED tests/test_aiomodernforms.py::test_light_sleep_datetime - TypeError: '... 132s FAILED tests/test_aiomodernforms.py::test_light_sleep_int - TypeError: 'Timeo... 132s FAILED tests/test_aiomodernforms.py::test_light_sleep_clear - TypeError: 'Tim... 132s FAILED tests/test_aiomodernforms.py::test_fan - TypeError: 'Timeout' object d... 132s FAILED tests/test_aiomodernforms.py::test_fan_sleep_datetime - TypeError: 'Ti... 132s FAILED tests/test_aiomodernforms.py::test_fan_sleep_int - TypeError: 'Timeout... 132s FAILED tests/test_aiomodernforms.py::test_fan_sleep_clear - TypeError: 'Timeo... 132s FAILED tests/test_aiomodernforms.py::test_away - TypeError: 'Timeout' object ... 132s FAILED tests/test_aiomodernforms.py::test_adaptive_learning - TypeError: 'Tim... 132s FAILED tests/test_aiomodernforms.py::test_invalid_setting - TypeError: 'Timeo... 132s FAILED tests/test_aiomodernforms.py::test_connection_error - TypeError: 'Time... 132s FAILED tests/test_aiomodernforms.py::test_server_error - TypeError: 'Timeout'... 132s FAILED tests/test_aiomodernforms.py::test_reboot - TypeError: 'Timeout' objec... 132s FAILED tests/test_aiomodernforms.py::test_empty_response - TypeError: 'Timeou... 132s ========================= 17 failed, 2 passed in 0.29s ========================= 132s E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest.cLG5El/autopkgtest_tmp/build; python3.13 -m pytest -v 132s I: pybuild base:311: cd /tmp/autopkgtest.cLG5El/autopkgtest_tmp/build; python3.12 -m pytest -v 132s /usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. 132s The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" 132s 132s warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) 132s ============================= test session starts ============================== 132s platform linux -- Python 3.12.8, pytest-8.3.3, pluggy-1.5.0 -- /usr/bin/python3.12 132s cachedir: .pytest_cache 132s rootdir: /tmp/autopkgtest.cLG5El/autopkgtest_tmp/build 132s configfile: pytest.ini 132s testpaths: tests 132s plugins: aresponses-3.0.0, typeguard-4.4.1, cov-5.0.0, asyncio-0.24.0a1 132s asyncio: mode=Mode.STRICT, default_loop_scope=None 132s collecting ... collected 19 items 132s 132s tests/test_aiomodernforms.py::test_basic_status FAILED [ 5%] 132s tests/test_aiomodernforms.py::test_command FAILED [ 10%] 132s tests/test_aiomodernforms.py::test_light FAILED [ 15%] 132s tests/test_aiomodernforms.py::test_light_sleep_datetime FAILED [ 21%] 132s tests/test_aiomodernforms.py::test_light_sleep_int FAILED [ 26%] 132s tests/test_aiomodernforms.py::test_light_sleep_clear FAILED [ 31%] 132s tests/test_aiomodernforms.py::test_fan FAILED [ 36%] 132s tests/test_aiomodernforms.py::test_fan_sleep_datetime FAILED [ 42%] 132s tests/test_aiomodernforms.py::test_fan_sleep_int FAILED [ 47%] 132s tests/test_aiomodernforms.py::test_fan_sleep_clear FAILED [ 52%] 132s tests/test_aiomodernforms.py::test_away FAILED [ 57%] 132s tests/test_aiomodernforms.py::test_adaptive_learning FAILED [ 63%] 132s tests/test_aiomodernforms.py::test_invalid_setting FAILED [ 68%] 132s tests/test_aiomodernforms.py::test_connection_error FAILED [ 73%] 132s tests/test_aiomodernforms.py::test_server_error FAILED [ 78%] 132s tests/test_aiomodernforms.py::test_reboot FAILED [ 84%] 132s tests/test_aiomodernforms.py::test_status_not_initialized_response PASSED [ 89%] 132s tests/test_aiomodernforms.py::test_info_not_initialized_response PASSED [ 94%] 132s tests/test_aiomodernforms.py::test_empty_response FAILED [100%] 132s 132s =================================== FAILURES =================================== 132s ______________________________ test_basic_status _______________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_basic_status(aresponses): 132s """Test JSON response is handled correctly.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add( 132s "fan.local", 132s "/mf", 132s "POST", 132s response=basic_response, 132s repeat=2, 132s ) 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.update() 132s 132s tests/test_aiomodernforms.py:79: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s _________________________________ test_command _________________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_command(aresponses): 132s """Test to make sure setting lights works.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 132s 132s async def evaluate_request(request): 132s data = await request.json() 132s assert aiomodernforms.COMMAND_LIGHT_POWER in data 132s modified_response = basic_response.copy() 132s modified_response[STATE_LIGHT_POWER] = data[aiomodernforms.COMMAND_LIGHT_POWER] 132s return aresponses.Response( 132s status=200, 132s content_type="application/json", 132s text=json.dumps(modified_response), 132s ) 132s 132s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 132s 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.update() 132s 132s tests/test_aiomodernforms.py:108: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s __________________________________ test_light __________________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_light(aresponses): 132s """Test to make sure setting lights works.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 132s 132s async def evaluate_request(request): 132s data = await request.json() 132s assert aiomodernforms.COMMAND_LIGHT_POWER in data 132s assert aiomodernforms.COMMAND_LIGHT_BRIGHTNESS in data 132s assert aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER in data 132s modified_response = basic_response.copy() 132s modified_response[STATE_LIGHT_POWER] = data[aiomodernforms.COMMAND_LIGHT_POWER] 132s modified_response[STATE_LIGHT_BRIGHTNESS] = data[ 132s aiomodernforms.COMMAND_LIGHT_BRIGHTNESS 132s ] 132s modified_response[STATE_LIGHT_SLEEP_TIMER] = data[ 132s aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER 132s ] 132s return aresponses.Response( 132s status=200, 132s content_type="application/json", 132s text=json.dumps(modified_response), 132s ) 132s 132s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 132s 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.update() 132s 132s tests/test_aiomodernforms.py:143: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s __________________________ test_light_sleep_datetime ___________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_light_sleep_datetime(aresponses): 132s """Test to make sure setting light sleep works.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 132s 132s async def evaluate_request(request): 132s data = await request.json() 132s assert aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER in data 132s modified_response = basic_response.copy() 132s modified_response[STATE_LIGHT_SLEEP_TIMER] = data[ 132s aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER 132s ] 132s return aresponses.Response( 132s status=200, 132s content_type="application/json", 132s text=json.dumps(modified_response), 132s ) 132s 132s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 132s 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s sleep_time = datetime.now() + timedelta(minutes=2) 132s > await device.light( 132s sleep=sleep_time, 132s ) 132s 132s tests/test_aiomodernforms.py:180: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:251: in light 132s await self.request(commands=commands) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:178: in request 132s await self.update() 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s _____________________________ test_light_sleep_int _____________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_light_sleep_int(aresponses): 132s """Test to make sure setting light sleep works.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 132s 132s async def evaluate_request(request): 132s data = await request.json() 132s assert aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER in data 132s modified_response = basic_response.copy() 132s modified_response[STATE_LIGHT_SLEEP_TIMER] = data[ 132s aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER 132s ] 132s return aresponses.Response( 132s status=200, 132s content_type="application/json", 132s text=json.dumps(modified_response), 132s ) 132s 132s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 132s 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s sleep_time = datetime.now() + timedelta(seconds=120) 132s > await device.light( 132s sleep=120, 132s ) 132s 132s tests/test_aiomodernforms.py:209: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:251: in light 132s await self.request(commands=commands) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:178: in request 132s await self.update() 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s ____________________________ test_light_sleep_clear ____________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_light_sleep_clear(aresponses): 132s """Test to make sure setting light sleep works.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 132s 132s async def evaluate_request(request): 132s data = await request.json() 132s assert aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER in data 132s modified_response = basic_response.copy() 132s modified_response[STATE_LIGHT_SLEEP_TIMER] = data[ 132s aiomodernforms.COMMAND_LIGHT_SLEEP_TIMER 132s ] 132s return aresponses.Response( 132s status=200, 132s content_type="application/json", 132s text=json.dumps(modified_response), 132s ) 132s 132s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 132s 132s # check to clear timer 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.light( 132s sleep=0, 132s ) 132s 132s tests/test_aiomodernforms.py:238: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:251: in light 132s await self.request(commands=commands) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:178: in request 132s await self.update() 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s ___________________________________ test_fan ___________________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_fan(aresponses): 132s """Test to make sure setting fan works.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 132s 132s async def evaluate_request(request): 132s data = await request.json() 132s assert aiomodernforms.COMMAND_FAN_POWER in data 132s assert aiomodernforms.COMMAND_FAN_SPEED in data 132s assert aiomodernforms.COMMAND_FAN_DIRECTION in data 132s assert aiomodernforms.COMMAND_FAN_SLEEP_TIMER in data 132s modified_response = basic_response.copy() 132s modified_response[STATE_FAN_POWER] = data[aiomodernforms.COMMAND_FAN_POWER] 132s modified_response[STATE_FAN_SPEED] = data[aiomodernforms.COMMAND_FAN_SPEED] 132s modified_response[STATE_FAN_DIRECTION] = data[ 132s aiomodernforms.COMMAND_FAN_DIRECTION 132s ] 132s modified_response[STATE_FAN_SLEEP_TIMER] = data[ 132s aiomodernforms.COMMAND_FAN_SLEEP_TIMER 132s ] 132s return aresponses.Response( 132s status=200, 132s content_type="application/json", 132s text=json.dumps(modified_response), 132s ) 132s 132s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 132s 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.update() 132s 132s tests/test_aiomodernforms.py:274: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s ___________________________ test_fan_sleep_datetime ____________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_fan_sleep_datetime(aresponses): 132s """Test to make sure setting light sleep works.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 132s 132s async def evaluate_request(request): 132s data = await request.json() 132s assert aiomodernforms.COMMAND_FAN_SLEEP_TIMER in data 132s modified_response = basic_response.copy() 132s modified_response[STATE_FAN_SLEEP_TIMER] = data[ 132s aiomodernforms.COMMAND_FAN_SLEEP_TIMER 132s ] 132s return aresponses.Response( 132s status=200, 132s content_type="application/json", 132s text=json.dumps(modified_response), 132s ) 132s 132s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 132s 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s sleep_time = datetime.now() + timedelta(minutes=2) 132s > await device.fan( 132s sleep=sleep_time, 132s ) 132s 132s tests/test_aiomodernforms.py:311: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:313: in fan 132s await self.request(commands=commands) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:178: in request 132s await self.update() 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s ______________________________ test_fan_sleep_int ______________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_fan_sleep_int(aresponses): 132s """Test to make sure setting light sleep works.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 132s 132s async def evaluate_request(request): 132s data = await request.json() 132s assert aiomodernforms.COMMAND_FAN_SLEEP_TIMER in data 132s modified_response = basic_response.copy() 132s modified_response[STATE_FAN_SLEEP_TIMER] = data[ 132s aiomodernforms.COMMAND_FAN_SLEEP_TIMER 132s ] 132s return aresponses.Response( 132s status=200, 132s content_type="application/json", 132s text=json.dumps(modified_response), 132s ) 132s 132s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 132s 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s sleep_time = datetime.now() + timedelta(seconds=120) 132s > await device.fan( 132s sleep=120, 132s ) 132s 132s tests/test_aiomodernforms.py:340: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:313: in fan 132s await self.request(commands=commands) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:178: in request 132s await self.update() 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s _____________________________ test_fan_sleep_clear _____________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_fan_sleep_clear(aresponses): 132s """Test to make sure setting light sleep works.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 132s 132s async def evaluate_request(request): 132s data = await request.json() 132s assert aiomodernforms.COMMAND_FAN_SLEEP_TIMER in data 132s modified_response = basic_response.copy() 132s modified_response[STATE_FAN_SLEEP_TIMER] = data[ 132s aiomodernforms.COMMAND_FAN_SLEEP_TIMER 132s ] 132s return aresponses.Response( 132s status=200, 132s content_type="application/json", 132s text=json.dumps(modified_response), 132s ) 132s 132s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 132s 132s # check to clear timer 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.fan( 132s sleep=0, 132s ) 132s 132s tests/test_aiomodernforms.py:369: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:313: in fan 132s await self.request(commands=commands) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:178: in request 132s await self.update() 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s __________________________________ test_away ___________________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_away(aresponses): 132s """Test to make sure setting away mode works.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 132s 132s async def evaluate_request(request): 132s data = await request.json() 132s assert aiomodernforms.COMMAND_AWAY_MODE in data 132s modified_response = basic_response.copy() 132s modified_response[STATE_AWAY_MODE] = data[aiomodernforms.COMMAND_AWAY_MODE] 132s return aresponses.Response( 132s status=200, 132s content_type="application/json", 132s text=json.dumps(modified_response), 132s ) 132s 132s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 132s 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.update() 132s 132s tests/test_aiomodernforms.py:395: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s ____________________________ test_adaptive_learning ____________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_adaptive_learning(aresponses): 132s """Test to make sure setting adaptive learning mode works.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 132s 132s async def evaluate_request(request): 132s data = await request.json() 132s assert aiomodernforms.COMMAND_ADAPTIVE_LEARNING in data 132s modified_response = basic_response.copy() 132s modified_response[STATE_ADAPTIVE_LEARNING] = data[ 132s aiomodernforms.COMMAND_ADAPTIVE_LEARNING 132s ] 132s return aresponses.Response( 132s status=200, 132s content_type="application/json", 132s text=json.dumps(modified_response), 132s ) 132s 132s aresponses.add("fan.local", "/mf", "POST", response=evaluate_request) 132s 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.update() 132s 132s tests/test_aiomodernforms.py:422: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s _____________________________ test_invalid_setting _____________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_invalid_setting(aresponses): 132s """Test to make sure setting invalid settings are rejected.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 132s 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.update() 132s 132s tests/test_aiomodernforms.py:434: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s ____________________________ test_connection_error _____________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_connection_error(aresponses): 132s """Test to make validate proper connection error handling.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s with pytest.raises(aiomodernforms.ModernFormsConnectionError): 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.update() 132s 132s tests/test_aiomodernforms.py:502: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s ______________________________ test_server_error _______________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_server_error(aresponses): 132s """Test to make validate proper server error handling.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add( 132s "fan.local", 132s "/mf", 132s "POST", 132s response=aresponses.Response(text="error", status=500), 132s ) 132s 132s with pytest.raises(aiomodernforms.ModernFormsError): 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.update() 132s 132s tests/test_aiomodernforms.py:518: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s _________________________________ test_reboot __________________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_reboot(aresponses): 132s """Test how reboot is handled.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s aresponses.add("fan.local", "/mf", "POST", response=basic_response) 132s 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.update() 132s 132s tests/test_aiomodernforms.py:528: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s _____________________________ test_empty_response ______________________________ 132s 132s aresponses = 132s 132s @pytest.mark.asyncio 132s async def test_empty_response(aresponses): 132s """Test for an Empty Response.""" 132s aresponses.add("fan.local", "/mf", "POST", response=basic_info) 132s 132s async def send_empty_state(request): 132s await request.json() 132s return aresponses.Response( 132s status=200, 132s content_type="application/json", 132s text="{}", 132s ) 132s 132s aresponses.add("fan.local", "/mf", "POST", response=send_empty_state) 132s with pytest.raises(ModernFormsConnectionError): 132s async with aiomodernforms.ModernFormsDevice("fan.local") as device: 132s > await device.update() 132s 132s tests/test_aiomodernforms.py:568: 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:96: in update 132s info_data = await self._request({COMMAND_QUERY_STATIC_DATA: True}) 132s /usr/lib/python3/dist-packages/backoff/_async.py:151: in retry 132s ret = await target(*args, **kwargs) 132s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 132s 132s self = 132s commands = {'queryStaticShadowData': True} 132s 132s @backoff.on_exception( 132s backoff.expo, ModernFormsConnectionError, max_tries=3, logger=None 132s ) 132s async def _request(self, commands: Optional[dict] = None) -> Any: 132s """Handle a request to a Modern Forms Fan device.""" 132s scheme = "https" if self._tls else "http" 132s url = URL.build( 132s scheme=scheme, 132s host=self._host, 132s port=self._port, 132s path=self._base_path, 132s ) 132s 132s auth = None 132s if self._username and self._password: 132s auth = aiohttp.BasicAuth(self._username, self._password) 132s 132s headers = { 132s "User-Agent": self._user_agent, 132s "Accept": "application/json", 132s } 132s 132s if self._session is None: 132s self._session = aiohttp.ClientSession() 132s self._close_session = True 132s 132s # If updating the state, always request for a state response 132s if commands is None: 132s commands = {COMMAND_QUERY_STATUS: True} 132s 132s try: 132s > with async_timeout.timeout(self._request_timeout): 132s E TypeError: 'Timeout' object does not support the context manager protocol 132s 132s /usr/lib/python3/dist-packages/aiomodernforms/modernforms.py:139: TypeError 132s =========================== short test summary info ============================ 132s FAILED tests/test_aiomodernforms.py::test_basic_status - TypeError: 'Timeout'... 132s FAILED tests/test_aiomodernforms.py::test_command - TypeError: 'Timeout' obje... 132s FAILED tests/test_aiomodernforms.py::test_light - TypeError: 'Timeout' object... 132s FAILED tests/test_aiomodernforms.py::test_light_sleep_datetime - TypeError: '... 132s FAILED tests/test_aiomodernforms.py::test_light_sleep_int - TypeError: 'Timeo... 132s FAILED tests/test_aiomodernforms.py::test_light_sleep_clear - TypeError: 'Tim... 132s FAILED tests/test_aiomodernforms.py::test_fan - TypeError: 'Timeout' object d... 132s FAILED tests/test_aiomodernforms.py::test_fan_sleep_datetime - TypeError: 'Ti... 132s FAILED tests/test_aiomodernforms.py::test_fan_sleep_int - TypeError: 'Timeout... 132s FAILED tests/test_aiomodernforms.py::test_fan_sleep_clear - TypeError: 'Timeo... 132s FAILED tests/test_aiomodernforms.py::test_away - TypeError: 'Timeout' object ... 132s FAILED tests/test_aiomodernforms.py::test_adaptive_learning - TypeError: 'Tim... 132s FAILED tests/test_aiomodernforms.py::test_invalid_setting - TypeError: 'Timeo... 132s FAILED tests/test_aiomodernforms.py::test_connection_error - TypeError: 'Time... 132s FAILED tests/test_aiomodernforms.py::test_server_error - TypeError: 'Timeout'... 132s FAILED tests/test_aiomodernforms.py::test_reboot - TypeError: 'Timeout' objec... 132s FAILED tests/test_aiomodernforms.py::test_empty_response - TypeError: 'Timeou... 132s ========================= 17 failed, 2 passed in 0.39s ========================= 132s E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest.cLG5El/autopkgtest_tmp/build; python3.12 -m pytest -v 132s pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p "3.13 3.12" returned exit code 13 132s make: *** [/tmp/R4XOeZ9PRK/run:4: pybuild-autopkgtest] Error 25 132s pybuild-autopkgtest: error: /tmp/R4XOeZ9PRK/run pybuild-autopkgtest returned exit code 2 133s autopkgtest [17:15:10]: test pybuild-autopkgtest: -----------------------] 133s pybuild-autopkgtest FAIL non-zero exit status 25 133s autopkgtest [17:15:10]: test pybuild-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 133s autopkgtest [17:15:10]: @@@@@@@@@@@@@@@@@@@@ summary 133s pybuild-autopkgtest FAIL non-zero exit status 25 151s nova [W] Using flock in prodstack6-s390x 151s Creating nova instance adt-plucky-s390x-python-aiomodernforms-20241227-171257-juju-7f2275-prod-proposed-migration-environment-2-541c57a8-e40d-4e9f-afd3-a4d029212623 from image adt/ubuntu-plucky-s390x-server-20241227.img (UUID d15d5a0a-5e13-427a-80a7-01b67a54bf40)... 151s nova [W] Timed out waiting for ce58fcee-3092-4069-8606-42cf9181d372 to get deleted.